Skip to content

Commit

Permalink
chore: update pre-commit hooks (#459)
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.7 → v0.6.1](astral-sh/ruff-pre-commit@v0.5.7...v0.6.1)

* style: pre-commit fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Aug 24, 2024
1 parent c25179f commit 32c5938
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 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: end-of-file-fixer

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.7"
rev: "v0.6.1"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down
3 changes: 1 addition & 2 deletions src/decaylanguage/dec/dec.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,8 +934,7 @@ def print_decay_modes(
"" if model_params_list == [] else " ".join(model_params_list)
)
decay_chain: str = " ".join(list(dmdict["fs"])) # type: ignore[arg-type]
if len(decay_chain) > max_length:
max_length = len(decay_chain)
max_length = max(len(decay_chain), max_length)
ls.append((dmdict["bf"], decay_chain, dmdict["model"], model_params))

# Sort decays by decreasing BF
Expand Down
4 changes: 2 additions & 2 deletions tests/decay/test_decay.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,15 @@ def test_DecayMode_number_of_final_states():
assert len(dm) == 4


@pytest.fixture()
@pytest.fixture
def dc():
dm1 = DecayMode(0.0124, "K_S0 pi0", model="PHSP")
dm2 = DecayMode(0.692, "pi+ pi-")
dm3 = DecayMode(0.98823, "gamma gamma")
return DecayChain("D0", {"D0": dm1, "K_S0": dm2, "pi0": dm3})


@pytest.fixture()
@pytest.fixture
def dc2():
dm1 = DecayMode(0.6770, "D0 pi+")
dm2 = DecayMode(0.0124, "K_S0 pi0")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dec_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def particle(self, items):
return str(label)


@pytest.mark.skip()
@pytest.mark.skip
def test_dec_full():
txt = data.basepath.joinpath("DECAY_LHCB.DEC").read_text()
grammar = data.basepath.joinpath("decfile.lark").read_text()
Expand Down

0 comments on commit 32c5938

Please sign in to comment.