Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update pre-commit hooks #459

Merged
merged 2 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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