diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-30 17:44:39 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-30 17:44:39 +0200 |
commit | ef8834a6420e9e9141c48d230a0a312a3aa2597e (patch) | |
tree | 6d65a5230a794e33f5cce71979d34bcab9e8b352 /misc | |
parent | 28154b9a07d1eeb372e0757582dd913e2237da74 (diff) | |
parent | c5bd2f9dce17f3e6bf7d9681243e2743633db6f0 (diff) |
Merge pull request #64784 from yedpodtrzitko/yed/ci-add-mypy
ci: add Python static analysis check via mypy
Diffstat (limited to 'misc')
-rw-r--r-- | misc/scripts/mypy.ini | 11 | ||||
-rwxr-xr-x | misc/scripts/mypy_check.sh | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/misc/scripts/mypy.ini b/misc/scripts/mypy.ini new file mode 100644 index 0000000000..c1ea695ca5 --- /dev/null +++ b/misc/scripts/mypy.ini @@ -0,0 +1,11 @@ +[mypy] +ignore_missing_imports = true +disallow_any_generics = True +pretty = True +show_column_numbers = True +warn_redundant_casts = True +warn_return_any = True +warn_unreachable = True + +namespace_packages = True +explicit_package_bases = True diff --git a/misc/scripts/mypy_check.sh b/misc/scripts/mypy_check.sh new file mode 100755 index 0000000000..2a06486d67 --- /dev/null +++ b/misc/scripts/mypy_check.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -uo pipefail + +echo -e "Python: mypy static analysis..." +mypy --config-file=./misc/scripts/mypy.ini . |