Skip to content

Commit ff87a73

Browse files
committed
flake8
1 parent 6942e64 commit ff87a73

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import re
21
from setuptools import setup, find_packages
32

43

@@ -34,19 +33,21 @@ def main():
3433
'Operating System :: Microsoft :: Windows',
3534
'Operating System :: MacOS :: MacOS X',
3635
'Topic :: Software Development :: Libraries',
37-
# Specify the Python versions you support here. In particular, ensure
38-
# that you indicate whether you support Python 2, Python 3 or both.
36+
# Specify the Python versions you support here.
37+
# In particular, ensure that you indicate whether
38+
# you support Python 2, Python 3 or both.
3939
'Programming Language :: Python',
4040
'Programming Language :: Python :: 2',
4141
'Programming Language :: Python :: 2.7',
4242
'Programming Language :: Python :: 3',
4343
'Programming Language :: Python :: 3.4',
4444
'Programming Language :: Python :: 3.5',
4545
'Programming Language :: Python :: 3.6',
46-
],
46+
],
4747
packages=find_packages('src'),
4848
package_dir={'': 'src'},
4949
)
5050

51+
5152
if __name__ == '__main__':
5253
main()

src/apipkg/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
from .version import version as __version__
1313

14+
1415
def _py_abspath(path):
1516
"""
1617
special version of abspath
@@ -122,13 +123,13 @@ def __init__(self, name, importspec, implprefix=None, attr=None):
122123
self.__map__[name] = (modpath, attrname)
123124

124125
def __repr__(self):
125-
l = []
126+
repr_list = []
126127
if hasattr(self, '__version__'):
127-
l.append("version=" + repr(self.__version__))
128+
repr_list.append("version=" + repr(self.__version__))
128129
if hasattr(self, '__file__'):
129-
l.append('from ' + repr(self.__file__))
130-
if l:
131-
return '<ApiModule %r %s>' % (self.__name__, " ".join(l))
130+
repr_list.append('from ' + repr(self.__file__))
131+
if repr_list:
132+
return '<ApiModule %r %s>' % (self.__name__, " ".join(repr_list))
132133
return '<ApiModule %r>' % (self.__name__,)
133134

134135
def __makeattr(self, name):

test_apipkg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_realmodule_dict_import(self):
8585
def test_realmodule___doc__(self):
8686
"""test whether the __doc__ attribute is set properly from initpkg"""
8787
import realtest.x.module
88-
print (realtest.x.module.__map__)
88+
print(realtest.x.module.__map__)
8989
assert realtest.x.module.__doc__ == 'test module'
9090

9191

@@ -121,7 +121,7 @@ def test_recursive_import(self, monkeypatch, tmpdir):
121121
pkgdir.join('submod.py').write(py.code.Source("""
122122
import recmodule
123123
class someclass: pass
124-
print (recmodule.__dict__)
124+
print(recmodule.__dict__)
125125
"""))
126126
monkeypatch.syspath_prepend(tmpdir)
127127
import recmodule
@@ -174,7 +174,7 @@ def test_parsenamespace():
174174
test.raises __.test.outcome::raises
175175
"""
176176
d = parsenamespace(spec)
177-
print (d)
177+
print(d)
178178
assert d == {
179179
'test': {'raises': '__.test.outcome::raises'},
180180
'path': {
@@ -364,7 +364,7 @@ def init():
364364
if mode == 'attr':
365365
assert mod.newattr == 42
366366
elif mode == "dict":
367-
print (list(mod.__dict__.keys()))
367+
print(list(mod.__dict__.keys()))
368368
assert 'newattr' in mod.__dict__
369369
elif mode == "onfirst":
370370
assert not hasattr(mod, '__onfirstaccess__')

0 commit comments

Comments
 (0)