Skip to content

Commit 4bf687a

Browse files
authored
Add flake8 (#105)
1 parent 1a8c39c commit 4bf687a

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

.flake8

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[flake8]
2+
max-line-length = 99
3+
ignore = W503
4+
exclude =
5+
.git
6+
.tox
7+
venv*
8+
9+
# pending revision
10+
cssselect/__init__.py
11+
cssselect/parser.py
12+
cssselect/xpath.py
13+
docs/conf.py
14+
setup.py
15+
tests/test_cssselect.py

.github/workflows/checks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ jobs:
77
strategy:
88
matrix:
99
include:
10+
- python-version: 3
11+
env:
12+
TOXENV: flake8
1013
- python-version: 3
1114
env:
1215
TOXENV: security

tox.ini

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
[tox]
2-
envlist = security,py
2+
envlist = flake8,security,py
33

44
[testenv]
5+
basepython = python3
56
deps=
67
-r tests/requirements.txt
7-
88
commands =
99
py.test --cov-report term --cov=cssselect
1010

11+
[testenv:flake8]
12+
deps =
13+
flake8==3.9.2
14+
commands =
15+
flake8 {posargs: cssselect setup.py tests docs/conf.py}
16+
1117
[testenv:security]
1218
deps =
1319
bandit
1420
commands =
15-
bandit -r -c .bandit.yml {posargs:cssselect}
21+
bandit -r -c .bandit.yml {posargs: cssselect}

0 commit comments

Comments
 (0)