diff options
author | Patrik Teivonen <patrik.teivonen@qt.io> | 2022-06-02 14:53:43 +0300 |
---|---|---|
committer | Patrik Teivonen <patrik.teivonen@qt.io> | 2022-08-16 07:05:22 +0000 |
commit | 753428afc1ec207c4c17c760ce38a9a83d15f4d7 (patch) | |
tree | 5f944373e1c81846fe889b569ec608c386ebb04f /.pre-commit-config.yaml | |
parent | 506b1fe037a1b4fd6f3aec7862ca3fa2ea35006b (diff) |
Add hook for mypy static type checker
-Update mypy version in Pipfile
-Enable mypy pre-commit hook with default mypy options.
-Fix various type errors discovered by mypy.
-Install or ignore missing type stubs for untyped module imports.
-Missing type annotations will be added later in a separate patch.
Change-Id: I96a265a7c0392021a78ca84ec0304910199fde40
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
Diffstat (limited to '.pre-commit-config.yaml')
-rw-r--r-- | .pre-commit-config.yaml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 55aab8c52..5b73e342b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,3 +33,9 @@ repos: language: system types: [python] fail_fast: true + - id: mypy + name: Check types (mypy) + entry: bash -c 'for x in "$@"; do pipenv run python3 -m mypy "$x"; done' + language: system + types: [python] + fail_fast: true |