Skip to content
Permalink
Browse files

Merge pull request #835 from topazproject/flake8

Put the flake8 config in a real config file, also fix some violations
  • Loading branch information
alex committed Aug 1, 2014
2 parents 7dc713c + 6e21fc7 commit f0bd9f321f88d4e5d3511471230fdf9d2cd937d5
Showing with 17 additions and 11 deletions.
  1. +1 −7 tasks/travis.py
  2. +8 −4 topaz/utils/regexp.py
  3. +8 −0 tox.ini
@@ -129,13 +129,7 @@ def run_docs_tests(env):


def run_flake8_tests(env):
# E124 closing bracket does not match visual indentation
# E125 continuation line does not distinguish itself from next logical line
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
# E501 line too long
# F811 redefinition of unused
invoke.run('flake8 . --exclude="__pycache__,.git,docs" --ignore="E124,E125,E128,E129,E501,F811"')
invoke.run('flake8 .')


TEST_TYPES = {
@@ -495,8 +495,10 @@ def _split_common_prefix(self, info, branches):
prefix = alternatives[0]
pos = 0
end_pos = max_count
while (pos < end_pos and prefix[pos].can_be_affix() and
[None for a in alternatives if a[pos] == prefix[pos]]):
while (
pos < end_pos and prefix[pos].can_be_affix() and
[None for a in alternatives if a[pos] == prefix[pos]]
):
pos += 1
if pos == 0:
return [], branches
@@ -518,8 +520,10 @@ def _split_common_suffix(self, info, branches):
suffix = alternatives[0]
pos = -1
end_pos = -1 - max_count
while (pos > end_pos and suffix[pos].can_be_affix() and
[None for a in alternatives if a[pos] == suffix[pos]]):
while (
pos > end_pos and suffix[pos].can_be_affix() and
[None for a in alternatives if a[pos] == suffix[pos]]
):
pos -= 1
count = -1 - pos
if count == 0:
@@ -0,0 +1,8 @@
[flake8]
exclude = __pycache__,.git/,docs/,spec/
# E124 closing bracket does not match visual indentation
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
# E501 line too long
# F811 redefinition of unused
ignore = E124,E128,E129,E501,F811

0 comments on commit f0bd9f3

Please sign in to comment.
You can’t perform that action at this time.