mirror of https://github.com/scrapy/scrapy.git
Run flake8 directly.
This commit is contained in:
parent
d1515cc075
commit
5fa613b419
10
conftest.py
10
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",
|
||||
|
|
|
|||
3
tox.ini
3
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+
|
||||
|
|
|
|||
Loading…
Reference in New Issue