Skip to content

Commit

Permalink
Test flake8 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
sallner committed May 17, 2018
1 parent 539e751 commit 0791f54
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ python:
install:
- pip install -U setuptools==33.1.1
- pip install zc.buildout
- pip install flake8
- buildout bootstrap
- buildout
script:
- bin/test -v1
- flake8 --doctests src setup.py
notifications:
email: false
cache:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ignore =
bootstrap.py

[flake8]
ignore = N801,N802,N803,N805,N806,N812,E301
ignore = N801,N802,N803,N805,N806,N812,E301,W503
exclude = bootstrap.py

[bdist_wheel]
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
description="A BTree based implementation for Zope 2's OFS.",
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
long_description=(open('README.rst').read() + '\n' +
open('CHANGES.rst').read()),
long_description=(open('README.rst').read()
+ '\n'
+ open('CHANGES.rst').read()),
packages=find_packages('src'),
namespace_packages=['Products'],
package_dir={'': 'src'},
Expand Down
6 changes: 3 additions & 3 deletions src/Products/BTreeFolder2/BTreeFolder2.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ def _cleanup(self):
check(self._mt_index)
keys = set(self._tree.keys())
for key, value in self._mt_index.items():
if (key not in self._mt_index or
self._mt_index[key] is not value):
if (key not in self._mt_index
or self._mt_index[key] is not value):
raise AssertionError(
"Missing or incorrect meta_type index: %s"
% repr(key))
Expand All @@ -205,7 +205,7 @@ def _cleanup(self):
new = len(keys)
if self._count() != new:
self._count.set(new)
except:
except Exception:
LOG.error('Failed to fix %s.' % path,
exc_info=sys.exc_info())
raise
Expand Down

0 comments on commit 0791f54

Please sign in to comment.