Run flake8 directly.

This commit is contained in:
Andrey Rakhmatullin 2022-10-10 11:02:57 +06:00
parent d1515cc075
commit 5fa613b419
2 changed files with 1 additions and 12 deletions

View File

@ -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",

View File

@ -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+