Skip to content

Commit

Permalink
FIX: revert autofixes of pydocstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Jul 6, 2023
1 parent 1f2afcb commit 0480af4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions src/ampform_dpd/spin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ def generate_ls_couplings(
child2_spin: SupportsFloat,
max_L: int = 3, # noqa: N803
) -> list[tuple[int, sp.Rational]]:
r""">>> generate_ls_couplings(1.5, 0.5, 0)
[(1, 1/2), (2, 1/2)].
r"""
>>> generate_ls_couplings(1.5, 0.5, 0)
[(1, 1/2), (2, 1/2)]
"""
s1 = float(child1_spin)
s2 = float(child2_spin)
Expand All @@ -34,11 +35,12 @@ def filter_parity_violating_ls(
child1_parity: SupportsInt,
child2_parity: SupportsInt,
) -> list[tuple[int, sp.Rational]]:
r""">>> LS = generate_ls_couplings(0.5, 1.5, 0) # Λc → Λ(1520)π
r"""
>>> LS = generate_ls_couplings(0.5, 1.5, 0) # Λc → Λ(1520)π
>>> LS
[(1, 3/2), (2, 3/2)]
>>> filter_parity_violating_ls(LS, +1, -1, -1)
[(2, 3/2)].
[(2, 3/2)]
"""
η0, η1, η2 = (
int(parent_parity),
Expand All @@ -49,17 +51,19 @@ def filter_parity_violating_ls(


def create_spin_range(spin: SupportsFloat) -> list[sp.Rational]:
""">>> create_spin_range(1.5)
[-3/2, -1/2, 1/2, 3/2].
"""
>>> create_spin_range(1.5)
[-3/2, -1/2, 1/2, 3/2]
"""
return create_rational_range(-spin, spin)


def create_rational_range(
__from: SupportsFloat, __to: SupportsFloat
) -> list[sp.Rational]:
""">>> create_rational_range(-0.5, +1.5)
[-1/2, 1/2, 3/2].
"""
>>> create_rational_range(-0.5, +1.5)
[-1/2, 1/2, 3/2]
"""
spin_range = arange(float(__from), +float(__to) + 0.5)
return list(map(sp.Rational, spin_range))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_formulate_theta_hat_angle():
assert formulate_theta_hat_angle(i, i)[1] == 0


def test_formulate_zeta_angle_equation_A6():
def test_formulate_zeta_angle_equation_A6(): # noqa: N802
"""Test Eq. (A6), https://journals.aps.org/prd/pdf/10.1103/PhysRevD.101.034033#page=10."""
for i in [1, 2, 3]:
for k in [1, 2, 3]:
Expand Down

0 comments on commit 0480af4

Please sign in to comment.