Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions proselint/registry/checks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ def path_segments(self) -> list[str]:

def matches_partial(self, partial: str) -> bool:
"""Check if `partial` is a subset key of the full check path."""
partial_segments = partial.split(".")

return self.path_segments[: len(partial_segments)] == partial_segments
return self.path == partial or self.path.startswith(f"{partial}.")

def check(self, text: str) -> Iterator[CheckResult]:
"""Apply the check over `text`."""
Expand Down