Skip to content

Commit 9801911

Browse files
committed
Add a PyLint CI pipeline
1 parent eb40f21 commit 9801911

File tree

3 files changed

+57
-7
lines changed

3 files changed

+57
-7
lines changed

.travis.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
language: python
2-
python:
3-
- '2.7'
4-
- '3.4'
5-
- '3.5'
6-
- '3.6'
7-
- '3.7'
2+
sudo: false
3+
matrix:
4+
include:
5+
- python: 3.7
6+
env: TOXENV=pylint
7+
- python: 2.7
8+
env: TOXENV=py27
9+
- python: 3.4
10+
env: TOXENV=py34
11+
- python: 3.5
12+
env: TOXENV=py35
13+
- python: 3.6
14+
env: TOXENV=py36
15+
- python: 3.7
16+
env: TOXENV=py37
817
install:
918
- pip install -r tests/requirements.txt -e .
1019
script:
@@ -21,4 +30,4 @@ deploy:
2130
on:
2231
tags: true
2332
repo: scrapy/cssselect
24-
condition: "$TRAVIS_PYTHON_VERSION == '3.7'"
33+
condition: "$TOXENV == py37"

pylintrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[MASTER]
2+
persistent=no
3+
4+
[MESSAGES CONTROL]
5+
disable=assignment-from-no-return,
6+
bad-continuation,
7+
bad-whitespace,
8+
c-extension-no-member,
9+
consider-using-in,
10+
fixme,
11+
inconsistent-return-statements,
12+
invalid-name,
13+
missing-class-docstring,
14+
missing-function-docstring,
15+
missing-module-docstring,
16+
multiple-imports,
17+
no-else-return,
18+
no-member,
19+
no-self-use,
20+
redefined-builtin,
21+
redefined-outer-name,
22+
too-few-public-methods,
23+
too-many-arguments,
24+
too-many-branches,
25+
too-many-function-args,
26+
too-many-lines,
27+
too-many-public-methods,
28+
too-many-statements,
29+
undefined-variable,
30+
unidiomatic-typecheck,
31+
unused-argument,
32+
unused-import,
33+
useless-object-inheritance # Required for Python 2 support

tox.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@ deps=
77

88
commands =
99
py.test --cov-report term --cov=cssselect
10+
11+
[testenv:pylint]
12+
basepython = python3.7
13+
deps =
14+
{[testenv]deps}
15+
pylint
16+
commands =
17+
pylint cssselect docs setup.py tests

0 commit comments

Comments
 (0)