diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..89e6e07 --- /dev/null +++ b/.flake8 @@ -0,0 +1,15 @@ +[flake8] +max-line-length = 99 +ignore = W503 +exclude = + .git + .tox + venv* + + # pending revision + cssselect/__init__.py + cssselect/parser.py + cssselect/xpath.py + docs/conf.py + setup.py + tests/test_cssselect.py diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 99fff74..2f38d19 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -7,6 +7,9 @@ jobs: strategy: matrix: include: + - python-version: 3 + env: + TOXENV: flake8 - python-version: 3 env: TOXENV: security diff --git a/tox.ini b/tox.ini index eabac24..5ae98ce 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,21 @@ [tox] -envlist = security,py +envlist = flake8,security,py [testenv] +basepython = python3 deps= -r tests/requirements.txt - commands = py.test --cov-report term --cov=cssselect +[testenv:flake8] +deps = + flake8==3.9.2 +commands = + flake8 {posargs: cssselect setup.py tests docs/conf.py} + [testenv:security] deps = bandit commands = - bandit -r -c .bandit.yml {posargs:cssselect} + bandit -r -c .bandit.yml {posargs: cssselect}