From c5bd2f9dce17f3e6bf7d9681243e2743633db6f0 Mon Sep 17 00:00:00 2001 From: Jiri Suchan Date: Tue, 23 Aug 2022 22:21:46 +0900 Subject: ci: add Python static analysis check via mypy --- misc/scripts/mypy.ini | 11 +++++++++++ misc/scripts/mypy_check.sh | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 misc/scripts/mypy.ini create mode 100755 misc/scripts/mypy_check.sh (limited to 'misc/scripts') 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 . -- cgit v1.2.3