diff --git a/plugins/module_utils/errors.py b/plugins/module_utils/errors.py index 38e9b380072..17bc6ed1e36 100644 --- a/plugins/module_utils/errors.py +++ b/plugins/module_utils/errors.py @@ -14,7 +14,6 @@ class AWSErrorHandler: - """_CUSTOM_EXCEPTION can be overridden by subclasses to customize the exception raised""" _CUSTOM_EXCEPTION = AnsibleAWSError diff --git a/pyproject.toml b/pyproject.toml index ee0d09c26ab..8dc7ea2e9ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,20 @@ [tool.black] skip-string-normalization = false line-length = 120 -target-version = [ "py37", "py38",] -extend-exclude = "/(\n | plugins/module_utils/_version.py\n)/\n" +target-version = ['py37', 'py38'] +extend-exclude = ''' +/( + | plugins/module_utils/_version.py +)/ +''' [tool.darker] revision = "origin/main.." -src = [ "plugins", "tests/unit", "tests/integration",] +src = [ + "plugins", + "tests/unit", + "tests/integration", +] [tool.isort] profile = "black" @@ -76,7 +84,7 @@ ignore = [ "N802", # Function name should be lowercase "N818", # Exception name should be named with an Error suffix "N803", # Argument name `keyId` should be lowercase - "N801", # Class name should use CapWords convention + "N801", # Class name should use CapWords convention ] # Disable fix for unused imports (`F401`). diff --git a/tests/integration/targets/setup_sshkey/files/ec2-fingerprint.py b/tests/integration/targets/setup_sshkey/files/ec2-fingerprint.py index 04d2eb1ea54..88ff4be3601 100644 --- a/tests/integration/targets/setup_sshkey/files/ec2-fingerprint.py +++ b/tests/integration/targets/setup_sshkey/files/ec2-fingerprint.py @@ -8,7 +8,6 @@ (but without needing the OpenSSL CLI) """ - import hashlib import sys diff --git a/tests/unit/utils/amazon_placebo_fixtures.py b/tests/unit/utils/amazon_placebo_fixtures.py index afe91adad43..6af542726ef 100644 --- a/tests/unit/utils/amazon_placebo_fixtures.py +++ b/tests/unit/utils/amazon_placebo_fixtures.py @@ -64,7 +64,7 @@ def placeboify(request, monkeypatch): request.fspath.dirname, "placebo_recordings", request.fspath.basename.replace(".py", ""), - request.function.__name__ + request.function.__name__, # remove the test_ prefix from the function & file name ).replace("test_", "")