Skip to content

Commit 5822db0

Browse files
[ISS-1258][DC] renaming the function to meet length requirements
1 parent bf38353 commit 5822db0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pre_commit_hooks/detect_aws_credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_aws_secrets_from_env() -> set[str]:
3636
return keys
3737

3838

39-
def get_aws_secrets_from_json_file(json_credentials_file: str) -> set[str]:
39+
def get_aws_secrets_from_json(json_credentials_file: str) -> set[str]:
4040
"""Extract AWS secrets from JSON configuration files.
4141
4242
Read a JSON-style configuration file and return a set with all found AWS

tests/detect_aws_credentials_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pre_commit_hooks.detect_aws_credentials import get_aws_cred_files_from_env
88
from pre_commit_hooks.detect_aws_credentials import get_aws_secrets_from_env
99
from pre_commit_hooks.detect_aws_credentials import get_aws_secrets_from_file
10-
from pre_commit_hooks.detect_aws_credentials import get_aws_secrets_from_json_file
10+
from pre_commit_hooks.detect_aws_credentials import get_aws_secrets_from_json
1111
from pre_commit_hooks.detect_aws_credentials import main
1212
from testing.util import get_resource_path
1313

@@ -84,9 +84,9 @@ def test_get_aws_secrets_from_env(env_vars, values):
8484
('ok_json.json', set()),
8585
),
8686
)
87-
def test_get_aws_secrets_from_json_file(filename, expected_keys):
87+
def test_get_aws_secrets_from_json(filename, expected_keys):
8888
"""Test that reading secrets from files works."""
89-
keys = get_aws_secrets_from_json_file(get_resource_path(filename))
89+
keys = get_aws_secrets_from_json(get_resource_path(filename))
9090
assert keys == expected_keys
9191

9292

0 commit comments

Comments
 (0)