mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Add more CI checks (#1150)
* Enable mypy. * Add flake8. * Add pylint with a long list of ignores to be removed.
This commit is contained in:
@@ -484,7 +484,7 @@ class ServicesManager(BaseComposeManager):
|
||||
self.fail(f"The key {key!r} for `scale` is not a string")
|
||||
try:
|
||||
value = check_type_int(value)
|
||||
except TypeError as exc:
|
||||
except TypeError:
|
||||
self.fail(f"The value {value!r} for `scale[{key!r}]` is not an integer")
|
||||
if value < 0:
|
||||
self.fail(f"The value {value!r} for `scale[{key!r}]` is negative")
|
||||
|
||||
@@ -85,7 +85,7 @@ from ansible_collections.community.docker.plugins.module_utils._common_api impor
|
||||
def get_existing_volume(client, volume_name):
|
||||
try:
|
||||
return client.get_json("/volumes/{0}", volume_name)
|
||||
except NotFound as dummy:
|
||||
except NotFound:
|
||||
return None
|
||||
except Exception as exc:
|
||||
client.fail(f"Error inspecting volume: {exc}")
|
||||
|
||||
Reference in New Issue
Block a user