diff --git a/proselint/registry/checks/__init__.py b/proselint/registry/checks/__init__.py index ec623341b..bde567796 100644 --- a/proselint/registry/checks/__init__.py +++ b/proselint/registry/checks/__init__.py @@ -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`."""