Use asottile/add-trailing-comma
diff --git a/pre_commit_hooks/detect_aws_credentials.py b/pre_commit_hooks/detect_aws_credentials.py
index 42758f0..b2afd71 100644
--- a/pre_commit_hooks/detect_aws_credentials.py
+++ b/pre_commit_hooks/detect_aws_credentials.py
@@ -12,7 +12,7 @@
files = set()
for env_var in (
'AWS_CONFIG_FILE', 'AWS_CREDENTIAL_FILE', 'AWS_SHARED_CREDENTIALS_FILE',
- 'BOTO_CONFIG'
+ 'BOTO_CONFIG',
):
if env_var in os.environ:
files.add(os.environ[env_var])
@@ -23,7 +23,7 @@
"""Extract AWS secrets from environment variables."""
keys = set()
for env_var in (
- 'AWS_SECRET_ACCESS_KEY', 'AWS_SECURITY_TOKEN', 'AWS_SESSION_TOKEN'
+ 'AWS_SECRET_ACCESS_KEY', 'AWS_SECURITY_TOKEN', 'AWS_SESSION_TOKEN',
):
if env_var in os.environ:
keys.add(os.environ[env_var])
@@ -50,7 +50,7 @@
for section in parser.sections():
for var in (
'aws_secret_access_key', 'aws_security_token',
- 'aws_session_token'
+ 'aws_session_token',
):
try:
keys.add(parser.get(section, var))
@@ -93,13 +93,13 @@
help=(
'Location of additional AWS credential files from which to get '
'secret keys from'
- )
+ ),
)
parser.add_argument(
'--allow-missing-credentials',
dest='allow_missing_credentials',
action='store_true',
- help='Allow hook to pass when no credentials are detected.'
+ help='Allow hook to pass when no credentials are detected.',
)
args = parser.parse_args(argv)
@@ -124,7 +124,7 @@
print(
'No AWS keys were found in the configured credential files and '
'environment variables.\nPlease ensure you have the correct '
- 'setting for --credentials-file'
+ 'setting for --credentials-file',
)
return 2