diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d5aee9..a74f14f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,18 +2,18 @@ fail_fast: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-yaml - repo: https://github.com/rhysd/actionlint - rev: v1.7.7 + rev: v1.7.11 hooks: - id: actionlint args: [-ignore, SC] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.45.0 + rev: v0.47.0 hooks: - id: markdownlint-fix args: [-c, configs/.markdownlint.yaml, --fix, --disable, MD028] @@ -24,7 +24,7 @@ repos: - id: typos - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.2 + rev: v0.15.2 hooks: # Run the formatter - id: ruff-format diff --git a/nlp_span_comparison/nlp_span_comparison.py b/nlp_span_comparison/nlp_span_comparison.py index 222720c..afc7cd9 100644 --- a/nlp_span_comparison/nlp_span_comparison.py +++ b/nlp_span_comparison/nlp_span_comparison.py @@ -155,18 +155,22 @@ def _(index, mo, set_choices): model_A = mo.ui.button( label="Model A", on_change=lambda _: set_choices( - lambda v: v[: index.value] - + [{"index": index.value, "model": "A"}] - + v[index.value + 1 :] + lambda v: ( + v[: index.value] + + [{"index": index.value, "model": "A"}] + + v[index.value + 1 :] + ) ), ) model_B = mo.ui.button( label="Model B", on_change=lambda _: set_choices( - lambda v: v[: index.value] - + [{"index": index.value, "model": "B"}] - + v[index.value + 1 :] + lambda v: ( + v[: index.value] + + [{"index": index.value, "model": "B"}] + + v[index.value + 1 :] + ) ), ) mo.hstack([model_A, model_B], justify="space-around")