Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 7, 2023
1 parent dc6516d commit 151118f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/qrules/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def __attrs_post_init__(self) -> None:
msg = f"Incoming edge IDs should be {expected}, not {incoming}."
raise ValueError(msg)
n_out = len(outgoing)
expected = list(range(0, n_out))
expected = list(range(n_out))
if sorted(outgoing) != expected:
msg = f"Outgoing edge IDs should be {expected}, not {outgoing}."
raise ValueError(msg)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/conservation_rules/test_c_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_c_parity_all_defined(rule_input, expected):
),
(-1) ** l_magnitude == c_parity,
)
for c_parity, l_magnitude in product([-1, 1], range(0, 5))
for c_parity, l_magnitude in product([-1, 1], range(5))
],
)
def test_c_parity_multiparticle_boson(rule_input, expected):
Expand All @@ -85,7 +85,7 @@ def test_c_parity_multiparticle_boson(rule_input, expected):
(s_magnitude + l_magnitude) % 2 == abs(c_parity - 1) / 2,
)
for c_parity, s_magnitude, l_magnitude in product(
[-1, 1], range(0, 5), range(0, 5)
[-1, 1], range(5), range(5)
)
],
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/conservation_rules/test_g_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_g_parity_all_defined(rule_input, expected):
),
(-1) ** (l_magnitude + isospin) == g_parity,
)
for g_parity, isospin, l_magnitude in product([-1, 1], [0, 1], range(0, 5))
for g_parity, isospin, l_magnitude in product([-1, 1], [0, 1], range(5))
],
)
def test_g_parity_multiparticle_boson(rule_input, expected):
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/conservation_rules/test_parity_conservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
parity_in == parity_out1 * (-1) ** (l_magnitude),
)
for parity_in, parity_out1, l_magnitude in product(
[-1, 1], [-1, 1], range(0, 5)
[-1, 1], [-1, 1], range(5)
)
],
)
Expand Down Expand Up @@ -60,7 +60,7 @@ def test_parity_conservation(in_parities, out_parities, l_magnitude, expected):
in_parity * out_parity1 * out_parity2 * (-1) ** (in_spin_mag % 2) == 1,
)
for in_spin_mag, in_parity, out_parity1, out_parity2 in product(
range(0, 4), [-1, 1], [-1, 1], [-1, 1]
range(4), [-1, 1], [-1, 1], [-1, 1]
)
],
)
Expand Down Expand Up @@ -99,7 +99,7 @@ def test_parity_conservation_helicity_prefactor(
in_parity * (-1) ** (in_spin_mag % 2) == 1 and parity_prefactor == 1,
)
for in_spin_mag, in_parity, parity_prefactor in product(
range(0, 4), [-1, 1], [-1, 1]
range(4), [-1, 1], [-1, 1]
)
],
)
Expand Down

0 comments on commit 151118f

Please sign in to comment.