On 6/29/21 6:43 PM, John Snow wrote:
flake8 is a little eager to check everything it can. Limit it to
checking inside the qemu namespace directory only. Update setup.cfg now
that the exclude patterns are no longer necessary.
Signed-off-by: John Snow <js...@redhat.com>
---
python/setup.cfg | 2 --
python/tests/flake8.sh | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
Tested-by: Wainer dos Santos Moschetta <waine...@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <waine...@redhat.com>
How I tested it:
$ make check-dev
VENV .dev-venv
ACTIVATE .dev-venv
INSTALL qemu[devel] .dev-venv
ACTIVATE .dev-venv
make[1]: Entering directory '/home/wmoschet/src/qemu/python'
JOB ID : 41162d4a9e93095abb66c219227b6af27edbcf43
JOB LOG :
/home/wmoschet/avocado/job-results/job-2021-06-30T11.50-41162d4/job.log
(1/4) tests/flake8.sh: PASS (0.30 s)
(2/4) tests/isort.sh: PASS (0.12 s)
(3/4) tests/mypy.sh: PASS (0.32 s)
(4/4) tests/pylint.sh: PASS (4.46 s)
RESULTS : PASS 4 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 |
CANCEL 0
JOB TIME : 8.46 s
make[1]: Leaving directory '/home/wmoschet/src/qemu/python'
diff --git a/python/setup.cfg b/python/setup.cfg
index e730f208d3..11f71d5312 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -62,8 +62,6 @@ console_scripts =
[flake8]
extend-ignore = E722 # Prefer pylint's bare-except checks to flake8's
exclude = __pycache__,
- .venv,
- .tox,
[mypy]
strict = True
diff --git a/python/tests/flake8.sh b/python/tests/flake8.sh
index 51e0788462..1cd7d40fad 100755
--- a/python/tests/flake8.sh
+++ b/python/tests/flake8.sh
@@ -1,2 +1,2 @@
#!/bin/sh -e
-python3 -m flake8
+python3 -m flake8 qemu/