Skip to content

Commit ec58856

Browse files
committed
Clean up unnecessary noqa comments
Signed-off-by: Aarni Koskela <[email protected]>
1 parent fad792b commit ec58856

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

docker/types/containers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ class LogConfig(DictType):
4848
>>> container = client.create_container('busybox', 'true',
4949
... host_config=hc)
5050
>>> client.inspect_container(container)['HostConfig']['LogConfig']
51-
{'Type': 'json-file', 'Config': {'labels': 'production_status,geo', 'max-size': '1g'}}
52-
""" # noqa: E501
51+
{
52+
'Type': 'json-file',
53+
'Config': {'labels': 'production_status,geo', 'max-size': '1g'}
54+
}
55+
"""
5356
types = LogConfigTypesEnum
5457

5558
def __init__(self, **kwargs):

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import datetime
1919
import os
2020
import sys
21+
from importlib.metadata import version
2122
sys.path.insert(0, os.path.abspath('..'))
2223

2324

@@ -64,7 +65,6 @@
6465
# built documents.
6566
#
6667
# see https://github.com/pypa/setuptools_scm#usage-from-sphinx
67-
from importlib.metadata import version
6868
release = version('docker')
6969
# for example take major/minor
7070
version = '.'.join(release.split('.')[:2])

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
url='https://github.com/docker/docker-py',
4949
project_urls={
5050
'Documentation': 'https://docker-py.readthedocs.io',
51-
'Changelog': 'https://docker-py.readthedocs.io/en/stable/change-log.html', # noqa: E501
51+
'Changelog': 'https://docker-py.readthedocs.io/en/stable/change-log.html',
5252
'Source': 'https://github.com/docker/docker-py',
5353
'Tracker': 'https://github.com/docker/docker-py/issues',
5454
},

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: # noqa: E722
50+
except Exception:
5151
pass
5252
end = time.time()
5353
assert res is None

tests/unit/fake_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
CURRENT_VERSION = f'v{constants.DEFAULT_DOCKER_API_VERSION}'
66

7-
FAKE_CONTAINER_ID = '81cf499cc928ce3fedc250a080d2b9b978df20e4517304c45211e8a68b33e254' # noqa: E501
7+
FAKE_CONTAINER_ID = '81cf499cc928ce3fedc250a080d2b9b978df20e4517304c45211e8a68b33e254'
88
FAKE_IMAGE_ID = 'sha256:fe7a8fc91d3f17835cbb3b86a1c60287500ab01a53bc79c4497d09f07a3f0688' # noqa: E501
9-
FAKE_EXEC_ID = 'b098ec855f10434b5c7c973c78484208223a83f663ddaefb0f02a242840cb1c7' # noqa: E501
10-
FAKE_NETWORK_ID = '1999cfb42e414483841a125ade3c276c3cb80cb3269b14e339354ac63a31b02c' # noqa: E501
9+
FAKE_EXEC_ID = 'b098ec855f10434b5c7c973c78484208223a83f663ddaefb0f02a242840cb1c7'
10+
FAKE_NETWORK_ID = '1999cfb42e414483841a125ade3c276c3cb80cb3269b14e339354ac63a31b02c'
1111
FAKE_IMAGE_NAME = 'test_image'
1212
FAKE_TARBALL_PATH = '/path/to/tarball'
1313
FAKE_REPO_NAME = 'repo'

0 commit comments

Comments
 (0)