Skip to content

Commit

Permalink
Ignore or fix flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Feb 13, 2015
1 parent 8b929d8 commit 70cb7e9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
13 changes: 13 additions & 0 deletions setup.cfg
@@ -0,0 +1,13 @@
[flake8]
doctests = yes
ignore = E123,E133,E226,E241,E242,E501,W391,E261,E128
# http://pep8.readthedocs.org/en/latest/intro.html#error-codes
# E123: closing bracket does not match indentation of opening bracket’s line
# E133: closing bracket does not match visual indentation
# E226: missing whitespace around arithmetic operator
# E241: multiple spaces after ‘,’
# E242: tab after ‘,’
# E501: line too long
# W391 blank line at end of file
# E261: at least two spaces before inline comment
# E128: continuation line under-indented for visual indent
2 changes: 1 addition & 1 deletion src/zodbbrowser/browser.py
Expand Up @@ -143,7 +143,7 @@ def render(self):
if self.request.get('confirmed') == '1':
self.history.rollback(rtid)
transaction.get().note('Rollback to old state %s'
% self.requestedState)
% self.requestedState)
self.made_changes = True
self._redirectToSelf()
return ''
Expand Down
2 changes: 1 addition & 1 deletion src/zodbbrowser/diff.py
Expand Up @@ -99,7 +99,7 @@ def compareDictsHTML(new, old, tid=None, indent=''):
html.append(indent + ' <strong>%s</strong>: '
% IValueRenderer(key).render(tid))
if (action == CHANGED and isinstance(oldvalue, dict) and
isinstance(newvalue, dict)):
isinstance(newvalue, dict)):
html.append('dictionary changed:\n')
html.append(compareDictsHTML(newvalue, oldvalue, tid,
indent=indent + ' '))
Expand Down
2 changes: 1 addition & 1 deletion src/zodbbrowser/tests/test_browser.py
Expand Up @@ -94,7 +94,7 @@ def test_inequality(self):

def test_not_equals(self):
self.assertFalse(self.attribute !=
ZodbObjectAttribute('foo', 42L, 't565'))
ZodbObjectAttribute('foo', 42L, 't565'))
self.assertTrue(self.attribute != object())


Expand Down
2 changes: 1 addition & 1 deletion src/zodbbrowser/value.py
Expand Up @@ -204,7 +204,7 @@ def render(self, tid=None, can_link=True, threshold=100):
html.append(IValueRenderer(key).render(tid, can_link) + ': ' +
IValueRenderer(value).render(tid, can_link))
if (sum(map(len, html)) < threshold and
'<span class="struct">' not in ''.join(html)):
'<span class="struct">' not in ''.join(html)):
return '{%s}' % ', '.join(html)
else:
return join_with_commas(html, '{', '}')
Expand Down

0 comments on commit 70cb7e9

Please sign in to comment.