diff --git a/python/setup.cfg b/python/setup.cfg
index e730f208d3e5bcf16c1b1f3789c27ab9ccd1bbd7..11f71d531204612bb3e01cf29e9676de843a3f78 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 51e0788462be73bdee269a6e3b110e0cd7c1044e..1cd7d40fad8b30f4bc988a85c315c625a23313fa 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/