mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
Use default flake8 config
This commit is contained in:
parent
634383cffd
commit
4575652bd2
16 changed files with 119 additions and 81 deletions
|
|
@ -12,16 +12,16 @@ from typing import Set
|
|||
from six.moves import configparser
|
||||
|
||||
|
||||
def get_aws_credential_files_from_env(): # type: () -> Set[str]
|
||||
def get_aws_cred_files_from_env(): # type: () -> Set[str]
|
||||
"""Extract credential file paths from environment variables."""
|
||||
files = set()
|
||||
for env_var in (
|
||||
'AWS_CONFIG_FILE', 'AWS_CREDENTIAL_FILE', 'AWS_SHARED_CREDENTIALS_FILE',
|
||||
'BOTO_CONFIG',
|
||||
):
|
||||
if env_var in os.environ:
|
||||
files.add(os.environ[env_var])
|
||||
return files
|
||||
return {
|
||||
os.environ[env_var]
|
||||
for env_var in (
|
||||
'AWS_CONFIG_FILE', 'AWS_CREDENTIAL_FILE',
|
||||
'AWS_SHARED_CREDENTIALS_FILE', 'BOTO_CONFIG',
|
||||
)
|
||||
if env_var in os.environ
|
||||
}
|
||||
|
||||
|
||||
def get_aws_secrets_from_env(): # type: () -> Set[str]
|
||||
|
|
@ -115,7 +115,7 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
|||
|
||||
# Add the credentials files configured via environment variables to the set
|
||||
# of files to to gather AWS secrets from.
|
||||
credential_files |= get_aws_credential_files_from_env()
|
||||
credential_files |= get_aws_cred_files_from_env()
|
||||
|
||||
keys = set() # type: Set[str]
|
||||
for credential_file in credential_files:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue