Skip to content
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:

repos:
- repo: https://github.com/abravalheri/validate-pyproject
rev: "0.26"
rev: "v0.27"
hooks:
- id: validate-pyproject

Expand All @@ -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/"
Expand Down
2 changes: 2 additions & 0 deletions src/app_model/registries/_keybindings_reg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading