Skip to content

Commit

Permalink
chore: update pre-commit hooks (#487)
Browse files Browse the repository at this point in the history
* chore: update pre-commit hooks

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.1 → v0.5.2](astral-sh/ruff-pre-commit@v0.5.1...v0.5.2)

* fix mypy errors

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and Saransh-cpp authored Jul 16, 2024
1 parent 838e73c commit 4b6018f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.1"
rev: "v0.5.2"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down
6 changes: 3 additions & 3 deletions src/vector/backends/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def __init__(
complaint = """unrecognized combination of coordinates, allowed combinations are:\n
x= y=
rho= phi=""".replace(" ", " ")
if type(self) == VectorObject2D:
if type(self) is VectorObject2D:
raise TypeError(complaint)
else:
raise TypeError(f"{complaint}\n\nor their momentum equivalents")
Expand Down Expand Up @@ -1060,7 +1060,7 @@ def __init__(
rho= phi= z=
rho= phi= theta=
rho= phi= eta=""".replace(" ", " ")
if type(self) == VectorObject3D:
if type(self) is VectorObject3D:
raise TypeError(complaint)
else:
raise TypeError(f"{complaint}\n\nor their momentum equivalents")
Expand Down Expand Up @@ -1757,7 +1757,7 @@ def __init__(
rho= phi= theta= tau=
rho= phi= eta= t=
rho= phi= eta= tau=""".replace(" ", " ")
if type(self) == VectorObject4D:
if type(self) is VectorObject4D:
raise TypeError(complaint)
else:
raise TypeError(f"{complaint}\n\nor their momentum equivalents")
Expand Down
6 changes: 3 additions & 3 deletions src/vector/backends/sympy.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def __init__(self, azimuthal: AzimuthalSympy | None = None, **kwargs: sympy.Symb
complaint = """unrecognized combination of coordinates, allowed combinations are:\n
x= y=
rho= phi=""".replace(" ", " ")
if type(self) == VectorSympy2D:
if type(self) is VectorSympy2D:
raise TypeError(complaint)
else:
raise TypeError(f"{complaint}\n\nor their momentum equivalents")
Expand Down Expand Up @@ -870,7 +870,7 @@ def __init__(
rho= phi= z=
rho= phi= theta=
rho= phi= eta=""".replace(" ", " ")
if type(self) == VectorSympy3D:
if type(self) is VectorSympy3D:
raise TypeError(complaint)
else:
raise TypeError(f"{complaint}\n\nor their momentum equivalents")
Expand Down Expand Up @@ -1197,7 +1197,7 @@ def __init__(
rho= phi= theta= tau=
rho= phi= eta= t=
rho= phi= eta= tau=""".replace(" ", " ")
if type(self) == VectorSympy4D:
if type(self) is VectorSympy4D:
raise TypeError(complaint)
else:
raise TypeError(f"{complaint}\n\nor their momentum equivalents")
Expand Down

0 comments on commit 4b6018f

Please sign in to comment.