diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index edfce94b..adcb22ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: repos: - repo: https://github.com/abravalheri/validate-pyproject - rev: "0.26" + rev: "v0.27" hooks: - id: validate-pyproject @@ -16,20 +16,20 @@ repos: files: "^\\.github/workflows/.*\\.ya?ml$" - repo: https://github.com/adhtruong/mirrors-typos - rev: v1.50.2 + rev: v1.51.1 hooks: - id: typos args: [--force-exclude] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.8 + rev: v0.17.3 hooks: - id: ruff-check args: ["--fix", "--unsafe-fixes"] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v2.3.1 + rev: v2.4.1 hooks: - id: mypy files: "^src/" diff --git a/src/app_model/registries/_keybindings_reg.py b/src/app_model/registries/_keybindings_reg.py index e4c6d8a2..75c6586a 100644 --- a/src/app_model/registries/_keybindings_reg.py +++ b/src/app_model/registries/_keybindings_reg.py @@ -221,6 +221,8 @@ def get_context_prioritized_keybinding( """ if key in self._keymap: + # mypy 2.4 infers `Any` here: https://github.com/python/mypy/issues/22174 + entry: _RegisteredKeyBinding for entry in reversed(self._keymap[key]): if entry.when is None or entry.when.eval(context): return entry