From: John Snow Date: Tue, 19 Oct 2021 14:49:05 +0000 (-0400) Subject: iotests/297: Split mypy configuration out into mypy.ini X-Git-Tag: qemu-xen-4.17.0-rc4~259^2~20 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8f7960fa3120806e0933795c6f34d8b5b09c622b;p=qemu-xen.git iotests/297: Split mypy configuration out into mypy.ini More separation of code and configuration. Signed-off-by: John Snow Reviewed-by: Hanna Reitz Message-id: 20211019144918.3159078-3-jsnow@redhat.com Signed-off-by: John Snow --- diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297 index bc3a0ceb2a..b8101e6024 100755 --- a/tests/qemu-iotests/297 +++ b/tests/qemu-iotests/297 @@ -73,19 +73,7 @@ def run_linters(): sys.stdout.flush() env['MYPYPATH'] = env['PYTHONPATH'] - p = subprocess.run(('mypy', - '--warn-unused-configs', - '--disallow-subclassing-any', - '--disallow-any-generics', - '--disallow-incomplete-defs', - '--disallow-untyped-decorators', - '--no-implicit-optional', - '--warn-redundant-casts', - '--warn-unused-ignores', - '--no-implicit-reexport', - '--namespace-packages', - '--scripts-are-modules', - *files), + p = subprocess.run(('mypy', *files), env=env, check=False, stdout=subprocess.PIPE, diff --git a/tests/qemu-iotests/mypy.ini b/tests/qemu-iotests/mypy.ini new file mode 100644 index 0000000000..4c0339f558 --- /dev/null +++ b/tests/qemu-iotests/mypy.ini @@ -0,0 +1,12 @@ +[mypy] +disallow_any_generics = True +disallow_incomplete_defs = True +disallow_subclassing_any = True +disallow_untyped_decorators = True +implicit_reexport = False +namespace_packages = True +no_implicit_optional = True +scripts_are_modules = True +warn_redundant_casts = True +warn_unused_configs = True +warn_unused_ignores = True