Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Run flake8 directly.

Andrey Rakhmatullin5fa613b419f0
diff --git a/conftest.py b/conftest.py
index 117087790..d7fe80321 100644
--- a/conftest.py
+++ b/conftest.py
@@ -42,16 +42,6 @@ def chdir(tmpdir):
tmpdir.chdir()
-def pytest_collection_modifyitems(session, config, items):
- # Avoid executing tests when executing `--flake8` flag (pytest-flake8)
- try:
- from pytest_flake8 import Flake8Item
- if config.getoption('--flake8'):
- items[:] = [item for item in items if isinstance(item, Flake8Item)]
- except ImportError:
- pass
-
-
def pytest_addoption(parser):
parser.addoption(
"--reactor",
diff --git a/tox.ini b/tox.ini
index 463828e7c..822e96fde 100644
--- a/tox.ini
+++ b/tox.ini
@@ -58,11 +58,10 @@ deps =
{[testenv]deps}
# Twisted[http2] is required to import some files
Twisted[http2]>=17.9.0
- pytest-flake8==1.1.1
# newer ones don't work: https://github.com/tholo/pytest-flake8/issues/87
flake8==4.0.1
commands =
- pytest --flake8 {posargs:docs scrapy tests}
+ flake8 {posargs:docs scrapy tests}
[testenv:pylint]
# reppy does not support Python 3.9+