qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>, "Kevin Wolf" <kwolf@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	qemu-block@nongnu.org, "John Snow" <jsnow@redhat.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Willian Rampazzo" <wrampazz@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Beraldo Leal" <bleal@redhat.com>
Subject: [PATCH v4 15/24] python: add mypy to pipenv
Date: Thu, 11 Feb 2021 13:58:47 -0500	[thread overview]
Message-ID: <20210211185856.3975616-16-jsnow@redhat.com> (raw)
In-Reply-To: <20210211185856.3975616-1-jsnow@redhat.com>

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 qemu'.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 python/Pipfile      |  1 +
 python/Pipfile.lock | 37 ++++++++++++++++++++++++++++++++++++-
 python/setup.cfg    |  1 +
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/python/Pipfile b/python/Pipfile
index d1f7045f680..51c537b0d10 100644
--- a/python/Pipfile
+++ b/python/Pipfile
@@ -5,6 +5,7 @@ verify_ssl = true
 
 [dev-packages]
 flake8 = ">=3.6.0"
+mypy = ">=0.770"
 pylint = ">=2.6.0"
 
 [packages]
diff --git a/python/Pipfile.lock b/python/Pipfile.lock
index 869b0bdf67f..5f8aab117c3 100644
--- a/python/Pipfile.lock
+++ b/python/Pipfile.lock
@@ -1,7 +1,7 @@
 {
     "_meta": {
         "hash": {
-            "sha256": "9f6d4857a6c72ad40fc1ec1e58cdb76f187a2986ac4156f0027e5eb798ec69a9"
+            "sha256": "65f010a8f2e55e9870d2b7e0d8af129516097d23abf2504f396552748b067ade"
         },
         "pipfile-spec": 6,
         "requires": {
@@ -83,6 +83,41 @@
             ],
             "version": "==0.6.1"
         },
+        "mypy": {
+            "hashes": [
+                "sha256:0d2fc8beb99cd88f2d7e20d69131353053fbecea17904ee6f0348759302c52fa",
+                "sha256:2b216eacca0ec0ee124af9429bfd858d5619a0725ee5f88057e6e076f9eb1a7b",
+                "sha256:319ee5c248a7c3f94477f92a729b7ab06bf8a6d04447ef3aa8c9ba2aa47c6dcf",
+                "sha256:3e0c159a7853e3521e3f582adb1f3eac66d0b0639d434278e2867af3a8c62653",
+                "sha256:5615785d3e2f4f03ab7697983d82c4b98af5c321614f51b8f1034eb9ebe48363",
+                "sha256:5ff616787122774f510caeb7b980542a7cc2222be3f00837a304ea85cd56e488",
+                "sha256:6f8425fecd2ba6007e526209bb985ce7f49ed0d2ac1cc1a44f243380a06a84fb",
+                "sha256:74f5aa50d0866bc6fb8e213441c41e466c86678c800700b87b012ed11c0a13e0",
+                "sha256:90b6f46dc2181d74f80617deca611925d7e63007cf416397358aa42efb593e07",
+                "sha256:947126195bfe4709c360e89b40114c6746ae248f04d379dca6f6ab677aa07641",
+                "sha256:a301da58d566aca05f8f449403c710c50a9860782148332322decf73a603280b",
+                "sha256:aa9d4901f3ee1a986a3a79fe079ffbf7f999478c281376f48faa31daaa814e86",
+                "sha256:b9150db14a48a8fa114189bfe49baccdff89da8c6639c2717750c7ae62316738",
+                "sha256:b95068a3ce3b50332c40e31a955653be245666a4bc7819d3c8898aa9fb9ea496",
+                "sha256:ca7ad5aed210841f1e77f5f2f7d725b62c78fa77519312042c719ed2ab937876",
+                "sha256:d16c54b0dffb861dc6318a8730952265876d90c5101085a4bc56913e8521ba19",
+                "sha256:e0202e37756ed09daf4b0ba64ad2c245d357659e014c3f51d8cd0681ba66940a",
+                "sha256:e1c84c65ff6d69fb42958ece5b1255394714e0aac4df5ffe151bc4fe19c7600a",
+                "sha256:e32b7b282c4ed4e378bba8b8dfa08e1cfa6f6574067ef22f86bee5b1039de0c9",
+                "sha256:e3b8432f8df19e3c11235c4563a7250666dc9aa7cdda58d21b4177b20256ca9f",
+                "sha256:e497a544391f733eca922fdcb326d19e894789cd4ff61d48b4b195776476c5cf",
+                "sha256:f5fdf935a46aa20aa937f2478480ebf4be9186e98e49cc3843af9a5795a49a25"
+            ],
+            "index": "pypi",
+            "version": "==0.800"
+        },
+        "mypy-extensions": {
+            "hashes": [
+                "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d",
+                "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"
+            ],
+            "version": "==0.4.3"
+        },
         "pycodestyle": {
             "hashes": [
                 "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367",
diff --git a/python/setup.cfg b/python/setup.cfg
index 0bd55c5e373..f919e95f95b 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -26,6 +26,7 @@ extend-ignore = E722  # Prefer pylint's bare-except checks to flake8's
 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
-- 
2.29.2



  parent reply	other threads:[~2021-02-11 19:26 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 18:58 [PATCH v4 00/24] python: create installable package John Snow
2021-02-11 18:58 ` [PATCH v4 01/24] python/console_socket: avoid one-letter variable John Snow
2021-02-12  4:47   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 02/24] iotests/297: add --namespace-packages to mypy arguments John Snow
2021-02-12  4:53   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 03/24] python: create qemu packages John Snow
2021-02-12  5:17   ` Cleber Rosa
2021-02-15 20:31     ` John Snow
2021-02-11 18:58 ` [PATCH v4 04/24] python: create utils sub-package John Snow
2021-02-17  1:20   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 05/24] python: add qemu package installer John Snow
2021-02-17  2:23   ` Cleber Rosa
2021-02-17  3:38     ` John Snow
2021-02-11 18:58 ` [PATCH v4 06/24] python: add VERSION file John Snow
2021-02-17  2:26   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 07/24] python: add directory structure README.rst files John Snow
2021-02-17  2:47   ` Cleber Rosa
2021-02-18 17:45     ` John Snow
2021-02-11 18:58 ` [PATCH v4 08/24] python: Add pipenv support John Snow
2021-02-17  2:59   ` Cleber Rosa
2021-02-17  3:02     ` Cleber Rosa
2021-02-17 17:28       ` John Snow
2021-02-17 19:39         ` Cleber Rosa
2021-02-17  3:42     ` John Snow
2021-02-11 18:58 ` [PATCH v4 09/24] python: add pylint import exceptions John Snow
2021-02-17  3:07   ` Cleber Rosa
2021-02-17  3:44     ` John Snow
2021-02-11 18:58 ` [PATCH v4 10/24] python: move pylintrc into setup.cfg John Snow
2021-02-17  3:09   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 11/24] python: add pylint to pipenv John Snow
2021-02-17  4:12   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 12/24] python: move flake8 config to setup.cfg John Snow
2021-02-17  4:17   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 13/24] python: Add flake8 to pipenv John Snow
2021-02-17  4:20   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 14/24] python: move mypy.ini into setup.cfg John Snow
2021-02-11 18:58 ` John Snow [this message]
2021-02-17  4:38   ` [PATCH v4 15/24] python: add mypy to pipenv Cleber Rosa
2021-02-17 16:40     ` John Snow
2021-02-11 18:58 ` [PATCH v4 16/24] python: move .isort.cfg into setup.cfg John Snow
2021-02-17  4:44   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 17/24] python/qemu: add isort to pipenv John Snow
2021-02-17  4:45   ` Cleber Rosa
2021-02-11 18:58 ` [PATCH v4 18/24] python/qemu: add qemu package itself " John Snow
2021-02-17  4:47   ` Cleber Rosa
2021-02-17 16:42     ` John Snow
2021-02-11 18:58 ` [PATCH v4 19/24] python: add devel package requirements to setuptools John Snow
2021-02-11 18:58 ` [PATCH v4 20/24] python: add pytest and tests John Snow
2021-02-11 18:58 ` [PATCH v4 21/24] python: add excluded dirs to flake8 config John Snow
2021-02-11 18:58 ` [PATCH v4 22/24] python: add Makefile for some common tasks John Snow
2021-02-11 18:58 ` [PATCH v4 23/24] python: add .gitignore John Snow
2021-02-11 18:58 ` [PATCH v4 24/24] gitlab: add python linters to CI John Snow
2021-02-12  2:52 ` [PATCH v4 00/24] python: create installable package Cleber Rosa
2021-02-15 21:32   ` John Snow
2021-02-17  3:37     ` Cleber Rosa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210211185856.3975616-16-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=bleal@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    --cc=wrampazz@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).