aboutsummaryrefslogtreecommitdiff
path: root/python/setup.cfg
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-05-27 17:17:06 -0400
committerJohn Snow <jsnow@redhat.com>2021-06-01 16:21:21 -0400
commit0542a4c95767b2370cb6622efe723bb6197aa04c (patch)
tree3d967e8f83910f6c32bc37756f51919d7e000eb0 /python/setup.cfg
parente941c844e4446b6200ac102ef285544c406a2fcd (diff)
downloadqemu-0542a4c95767b2370cb6622efe723bb6197aa04c.zip
qemu-0542a4c95767b2370cb6622efe723bb6197aa04c.tar.gz
qemu-0542a4c95767b2370cb6622efe723bb6197aa04c.tar.bz2
python: add mypy to pipenv
0.730 appears to be about the oldest version that works with the features we want, including nice human readable output (to make sure iotest 297 passes), and type-parameterized Popen generics. 0.770, however, supports adding 'strict' to the config file, so require at least 0.770. Now that we are checking a namespace package, we need to tell mypy to allow PEP420 namespaces, so modify the mypy config as part of the move. mypy can now be run from the python root by typing 'mypy -p qemu'. A note on mypy invocation: Running it as "mypy qemu/" changes the import path detection mechanisms in mypy slightly, and it will fail. See https://github.com/python/mypy/issues/8584 for a decent entry point with more breadcrumbs on the various behaviors that contribute to this subtle difference. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Message-id: 20210527211715.394144-23-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python/setup.cfg')
-rw-r--r--python/setup.cfg1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/setup.cfg b/python/setup.cfg
index bd88b44..b485d61 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -31,6 +31,7 @@ exclude = __pycache__,
strict = True
python_version = 3.6
warn_unused_configs = True
+namespace_packages = True
[pylint.messages control]
# Disable the message, report, category or checker with the given id(s). You