Skip to content

Commit af98fc0

Browse files
committed
🎓 [Usage] Minor nits
Add period to end of all help strings Formatting in usage_test.py
1 parent d61d7ce commit af98fc0

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

detect_secrets/core/usage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def _add_filenames_argument(self):
8181
self.parser.add_argument(
8282
'filenames',
8383
nargs='*',
84-
help='Filenames to check',
84+
help='Filenames to check.',
8585
)
8686
return self
8787

@@ -427,5 +427,5 @@ def _add_keyword_exclude(self):
427427
self.parser.add_argument(
428428
'--keyword-exclude',
429429
type=str,
430-
help='Pass in regex to exclude false positives found by keyword detector',
430+
help='Pass in regex to exclude false positives found by keyword detector.',
431431
)

tests/core/usage_test.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class TestPluginOptions(object):
1010
@staticmethod
1111
def parse_args(argument_string=''):
1212
# PluginOptions are added in pre-commit hook
13-
return ParserBuilder().add_pre_commit_arguments()\
13+
return ParserBuilder()\
14+
.add_pre_commit_arguments()\
1415
.parse_args(argument_string.split())
1516

1617
def test_added_by_default(self):
@@ -61,9 +62,11 @@ def test_custom_limit(self, argument_string, expected_value):
6162
if expected_value is not None:
6263
args = self.parse_args(argument_string)
6364

64-
assert args.plugins['HexHighEntropyString'][
65-
'hex_limit'
66-
] == expected_value
65+
assert (
66+
args.plugins['HexHighEntropyString']['hex_limit']
67+
68+
== expected_value
69+
)
6770
else:
6871
with pytest.raises(SystemExit):
6972
self.parse_args(argument_string)

0 commit comments

Comments
 (0)