Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Sep 6, 2024
1 parent f206e1c commit 248d6a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/particle/particle/particle.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class InvalidParticle(RuntimeError):
_NON_UNIQUE_PDGIDS[-pdgid2] = -pdgid1



def _isospin_converter(isospin: str) -> float | None:
vals: dict[str | None, float | None] = {
"0": 0.0,
Expand Down
5 changes: 3 additions & 2 deletions tests/particle/test_particle.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,14 +707,15 @@ def test_decfile_style_names(name, pid):
def test_evtgen_name(name, pid): # noqa: ARG001
assert Particle.from_evtgen_name(name).evtgen_name == name


@pytest.mark.parametrize(
("pdgid1", "pdgid2"),
("pdgid1", "pdgid2"),
[
pytest.param(2212, 1000010010, id="proton"),
pytest.param(2112, 1000000010, id="neutron"),
pytest.param(-2212, -1000010010, id="anti-proton"),
pytest.param(-2112, -1000000010, id="anti-neutron"),
]
],
)
def test_eq_non_unique_pdgids(pdgid1, pdgid2):
"""The proton and the neutron have two pdgid representations, make sure they still compare equal"""
Expand Down

0 comments on commit 248d6a0

Please sign in to comment.