mirror of https://github.com/docker/docker-py.git
Clean up unnecessary noqa comments
Signed-off-by: Aarni Koskela <akx@iki.fi>
This commit is contained in:
parent
fd925d5959
commit
64fe747f3e
|
|
@ -48,8 +48,11 @@ class LogConfig(DictType):
|
||||||
>>> container = client.create_container('busybox', 'true',
|
>>> container = client.create_container('busybox', 'true',
|
||||||
... host_config=hc)
|
... host_config=hc)
|
||||||
>>> client.inspect_container(container)['HostConfig']['LogConfig']
|
>>> client.inspect_container(container)['HostConfig']['LogConfig']
|
||||||
{'Type': 'json-file', 'Config': {'labels': 'production_status,geo', 'max-size': '1g'}}
|
{
|
||||||
""" # noqa: E501
|
'Type': 'json-file',
|
||||||
|
'Config': {'labels': 'production_status,geo', 'max-size': '1g'}
|
||||||
|
}
|
||||||
|
"""
|
||||||
types = LogConfigTypesEnum
|
types = LogConfigTypesEnum
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from importlib.metadata import version
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
sys.path.insert(0, os.path.abspath('..'))
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -64,7 +65,6 @@ author = 'Docker Inc'
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# see https://github.com/pypa/setuptools_scm#usage-from-sphinx
|
# see https://github.com/pypa/setuptools_scm#usage-from-sphinx
|
||||||
from importlib.metadata import version
|
|
||||||
release = version('docker')
|
release = version('docker')
|
||||||
# for example take major/minor
|
# for example take major/minor
|
||||||
version = '.'.join(release.split('.')[:2])
|
version = '.'.join(release.split('.')[:2])
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -48,7 +48,7 @@ setup(
|
||||||
url='https://github.com/docker/docker-py',
|
url='https://github.com/docker/docker-py',
|
||||||
project_urls={
|
project_urls={
|
||||||
'Documentation': 'https://docker-py.readthedocs.io',
|
'Documentation': 'https://docker-py.readthedocs.io',
|
||||||
'Changelog': 'https://docker-py.readthedocs.io/en/stable/change-log.html', # noqa: E501
|
'Changelog': 'https://docker-py.readthedocs.io/en/stable/change-log.html',
|
||||||
'Source': 'https://github.com/docker/docker-py',
|
'Source': 'https://github.com/docker/docker-py',
|
||||||
'Tracker': 'https://github.com/docker/docker-py/issues',
|
'Tracker': 'https://github.com/docker/docker-py/issues',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ class ConnectionTimeoutTest(unittest.TestCase):
|
||||||
# This call isn't supposed to complete, and it should fail fast.
|
# This call isn't supposed to complete, and it should fail fast.
|
||||||
try:
|
try:
|
||||||
res = self.client.inspect_container('id')
|
res = self.client.inspect_container('id')
|
||||||
except: # noqa: E722
|
except Exception:
|
||||||
pass
|
pass
|
||||||
end = time.time()
|
end = time.time()
|
||||||
assert res is None
|
assert res is None
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ from . import fake_stat
|
||||||
|
|
||||||
CURRENT_VERSION = f'v{constants.DEFAULT_DOCKER_API_VERSION}'
|
CURRENT_VERSION = f'v{constants.DEFAULT_DOCKER_API_VERSION}'
|
||||||
|
|
||||||
FAKE_CONTAINER_ID = '81cf499cc928ce3fedc250a080d2b9b978df20e4517304c45211e8a68b33e254' # noqa: E501
|
FAKE_CONTAINER_ID = '81cf499cc928ce3fedc250a080d2b9b978df20e4517304c45211e8a68b33e254'
|
||||||
FAKE_IMAGE_ID = 'sha256:fe7a8fc91d3f17835cbb3b86a1c60287500ab01a53bc79c4497d09f07a3f0688' # noqa: E501
|
FAKE_IMAGE_ID = 'sha256:fe7a8fc91d3f17835cbb3b86a1c60287500ab01a53bc79c4497d09f07a3f0688' # noqa: E501
|
||||||
FAKE_EXEC_ID = 'b098ec855f10434b5c7c973c78484208223a83f663ddaefb0f02a242840cb1c7' # noqa: E501
|
FAKE_EXEC_ID = 'b098ec855f10434b5c7c973c78484208223a83f663ddaefb0f02a242840cb1c7'
|
||||||
FAKE_NETWORK_ID = '1999cfb42e414483841a125ade3c276c3cb80cb3269b14e339354ac63a31b02c' # noqa: E501
|
FAKE_NETWORK_ID = '1999cfb42e414483841a125ade3c276c3cb80cb3269b14e339354ac63a31b02c'
|
||||||
FAKE_IMAGE_NAME = 'test_image'
|
FAKE_IMAGE_NAME = 'test_image'
|
||||||
FAKE_TARBALL_PATH = '/path/to/tarball'
|
FAKE_TARBALL_PATH = '/path/to/tarball'
|
||||||
FAKE_REPO_NAME = 'repo'
|
FAKE_REPO_NAME = 'repo'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue