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,25 +5,25 @@ ci:

repos:
- repo: https://github.com/crate-ci/typos
rev: typos-dict-v0.12.4
rev: v1
hooks:
- id: typos
args: []

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.4
rev: v0.11.4
hooks:
- id: ruff
args: ["--fix", "--unsafe-fixes"]
- id: ruff-format

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
rev: v0.24.1
hooks:
- id: validate-pyproject

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
rev: v1.15.0
hooks:
- id: mypy
files: "^src/"
Expand Down
2 changes: 1 addition & 1 deletion src/app_model/expressions/_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def visit(self, node: ast.AST) -> ast.AST | None:
kwargs[name] = field

# return instance of Expr from this module corresponding to the node type
return cast(Expr, globals()[type_](**kwargs))
return cast("Expr", globals()[type_](**kwargs))


class _ExprSerializer(ast.NodeVisitor):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_qt/test_qmenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def test_menu(

# check that triggering the actions calls the associated commands
for cmd in (app.Commands.UNDO, app.Commands.REDO):
action = cast(QAction, menu.findAction(cmd))
action = cast("QAction", menu.findAction(cmd))
with qtbot.waitSignal(action.triggered):
action.trigger()
getattr(app.mocks, cmd).assert_called_once()

redo_action = cast(QAction, menu.findAction(app.Commands.REDO))
redo_action = cast("QAction", menu.findAction(app.Commands.REDO))

assert redo_action.isVisible()
assert redo_action.isEnabled()
Expand Down
Loading