Skip to content

Commit 7ab7fac

Browse files
committed
chore: run type-check git hook only when Python files were chaged and staged
1 parent b2dedc2 commit 7ab7fac

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ repos:
4949
name: Check typing annotations
5050
entry: mypy
5151
language: python
52+
files: ^src/package/|^tests/ # Declare files to run the hook only when necessary.
53+
types: [text, python]
5254
pass_filenames: false
5355
args: [--config-file, pyproject.toml]
5456

0 commit comments

Comments
 (0)