Skip to content

Commit a57ea5b

Browse files
docs: get_all_enabled
Co-authored-by: Tyler J Russell <xtylerjrx@gmail.com> Signed-off-by: drainpixie <121581793+drainpixie@users.noreply.github.com>
1 parent b468a8a commit a57ea5b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

proselint/registry/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ def checks(self) -> list[Check]:
5353
def get_all_enabled(
5454
self, enabled: dict[str, bool] = DEFAULT["checks"]
5555
) -> list[Check]:
56-
"""Filter registered checks by config values based on their keys."""
56+
"""
57+
Filter registered checks by config values based on their keys.
58+
59+
This assumes that keys are not nested, and sorted in descending order
60+
of depth (specificity). For example, all keys should look like
61+
`a.b.c`, and `a.b.c` should come before `a.b`.
62+
"""
5763
self.enabled_checks = enabled
5864

5965
return [

0 commit comments

Comments
 (0)