Skip to content

Commit a16f9ef

Browse files
committed
Enable flake8 and fix errors
1 parent 15be3bf commit a16f9ef

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

sifter/grammar/comparator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import re
2+
13
import sifter.comparator
24

35
__all__ = ('Comparator',)

sifter/tests/size.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self, arguments=None, tests=None):
2626
}
2727
)
2828
self.validate_tests_size(0)
29-
self.comparison_fn = COMPARISON_FNS[tagged_args['size'][0]]
29+
self.comparison_fn = self.COMPARISON_FNS[tagged_args['size'][0]]
3030
self.comparison_size = tagged_args['size'][1]
3131

3232
def evaluate(self, message, state):

tox.ini

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@
77
envlist = py27
88

99
[testenv]
10-
deps =
10+
deps = flake8
1111

1212
commands =
13+
# stop the build if there are Python syntax errors or undefined names
14+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
15+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
16+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
17+
1318
python -m unittest discover -v
19+
20+
[flake8]
21+
exclude =
22+
# this is the default list of excludes
23+
.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,
24+
# auto-generated files
25+
parsetab.py

0 commit comments

Comments
 (0)