Skip to content

Commit

Permalink
fix: deactivate attr.s order when total_ordering (#73)
Browse files Browse the repository at this point in the history
* style: order kwargs in attr.s
  • Loading branch information
redeboer authored Jun 18, 2021
1 parent 78aaabf commit 0c5df26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/qrules/particle.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _to_float(value: SupportsFloat) -> float:


@total_ordering
@attr.s(frozen=True, eq=False, hash=True)
@attr.s(eq=False, frozen=True, hash=True, order=False)
class Spin:
"""Safe, immutable data container for spin **with projection**."""

Expand Down Expand Up @@ -120,7 +120,7 @@ def _to_spin(value: Union[Spin, Tuple[float, float]]) -> Spin:


@total_ordering
@attr.s(frozen=True, order=False, repr=True, kw_only=True)
@attr.s(frozen=True, kw_only=True, order=False, repr=True)
class Particle: # pylint: disable=too-many-instance-attributes
"""Immutable container of data defining a physical particle.
Expand Down
2 changes: 1 addition & 1 deletion src/qrules/quantum_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


@total_ordering
@attr.s(frozen=True, repr=False, eq=False, hash=True)
@attr.s(eq=False, frozen=True, hash=True, order=False, repr=False)
class Parity:
value: int = attr.ib(validator=instance_of(int))

Expand Down

0 comments on commit 0c5df26

Please sign in to comment.