Skip to content

Commit 72f4f52

Browse files
committed
Update test dependencies to latest version, fix some flake8 errors
Signed-off-by: Joffrey F <[email protected]>
1 parent 5fc7f62 commit 72f4f52

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

docker/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def _resolve_authconfig_credstore(self, registry, credstore_name):
273273
'Password': data['Secret'],
274274
})
275275
return res
276-
except dockerpycreds.CredentialsNotFound as e:
276+
except dockerpycreds.CredentialsNotFound:
277277
log.debug('No entry found')
278278
return None
279279
except dockerpycreds.StoreError as e:

docker/types/containers.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ class LogConfig(DictType):
5151
... host_config=hc)
5252
>>> client.inspect_container(container)['HostConfig']['LogConfig']
5353
{'Type': 'json-file', 'Config': {'labels': 'production_status,geo', 'max-size': '1g'}}
54-
55-
""" # flake8: noqa
54+
""" # noqa: E501
5655
types = LogConfigTypesEnum
5756

5857
def __init__(self, **kwargs):
@@ -320,10 +319,10 @@ def __init__(self, version, binds=None, port_bindings=None,
320319
if not isinstance(ulimits, list):
321320
raise host_config_type_error('ulimits', ulimits, 'list')
322321
self['Ulimits'] = []
323-
for l in ulimits:
324-
if not isinstance(l, Ulimit):
325-
l = Ulimit(**l)
326-
self['Ulimits'].append(l)
322+
for lmt in ulimits:
323+
if not isinstance(lmt, Ulimit):
324+
lmt = Ulimit(**lmt)
325+
self['Ulimits'].append(lmt)
327326

328327
if log_config is not None:
329328
if not isinstance(log_config, LogConfig):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
url='https://github.com/docker/docker-py',
6868
project_urls={
6969
'Documentation': 'https://docker-py.readthedocs.io',
70-
'Changelog': 'https://docker-py.readthedocs.io/en/stable/change-log.html', # flake8: noqa
70+
'Changelog': 'https://docker-py.readthedocs.io/en/stable/change-log.html', # noqa: E501
7171
'Source': 'https://github.com/docker/docker-py',
7272
'Tracker': 'https://github.com/docker/docker-py/issues',
7373
},

test-requirements.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
coverage==3.7.1
2-
flake8==3.4.1
1+
coverage==4.5.2
2+
flake8==3.6.0; python_version != '3.3'
3+
flake8==3.4.1; python_version == '3.3'
34
mock==1.0.1
45
pytest==2.9.1; python_version == '3.3'
5-
pytest==3.6.3; python_version > '3.3'
6-
pytest-cov==2.1.0
6+
pytest==4.1.0; python_version != '3.3'
7+
pytest-cov==2.6.1; python_version != '3.3'
8+
pytest-cov==2.5.1; python_version == '3.3'
79
pytest-timeout==1.3.3

tests/integration/api_client_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_timeout(self):
4747
# This call isn't supposed to complete, and it should fail fast.
4848
try:
4949
res = self.client.inspect_container('id')
50-
except:
50+
except: # noqa: E722
5151
pass
5252
end = time.time()
5353
assert res is None

tests/unit/dockertypes_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
try:
1616
from unittest import mock
17-
except:
17+
except: # noqa: E722
1818
import mock
1919

2020

0 commit comments

Comments
 (0)