Skip to content

Commit 4656c42

Browse files
author
Aaron Loo
committed
coverage wat
1 parent afc9195 commit 4656c42

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ There are many examples of existing plugins to reference, under
8787
### Tips
8888

8989
- There should be a total of three modified files in a minimal new plugin: the
90-
plugin file, it's corresponding code, and an updated README.
90+
plugin file, it's corresponding test, and an updated README.
9191
- If your plugin uses customizable options (e.g. entropy limit in `HighEntropyStrings`)
9292
be sure to add default options to the plugin's `default_options`.
9393

detect_secrets/plugins/common/util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
def get_mapping_from_secret_type_to_class_name():
1616
"""Returns secret_type => plugin classname"""
1717
return {
18-
value.secret_type: key
19-
for key, value in import_plugins().items()
18+
plugin.secret_type: name
19+
for name, plugin in import_plugins().items()
2020
}
2121

2222

tests/pre_commit_hook_test.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,8 @@ def test_baseline_gets_updated(
205205
},
206206
])
207207

208-
assert baseline_written['plugins_used'] == sorted(
209-
regex_based_plugins,
210-
key=lambda x: x['name'],
211-
)
208+
expected = sorted(regex_based_plugins, key=lambda x: x['name'])
209+
assert baseline_written['plugins_used'] == expected
212210

213211
def test_writes_new_baseline_if_modified(self):
214212
baseline_string = _create_baseline()

0 commit comments

Comments
 (0)