From c75254cd6b8e6fb3fbde2418a90d8c68b6d1324f Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 25 Oct 2026 11:20:21 -0700 Subject: [PATCH 1/2] Prove Paths Are Not Words in the Vocabulary Check The is_word docstring says a path with a separator is not a word, and no case held one. Six slash paths that would read as words without their separator, and a backslash path, now sit in the case covering flags and underscored names. Co-Authored-By: Claude Opus 5.5 --- tests/test_prose_lint.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_prose_lint.py b/tests/test_prose_lint.py index 8b4f8986..0967e7d8 100755 --- a/tests/test_prose_lint.py +++ b/tests/test_prose_lint.py @@ -7606,9 +7606,11 @@ def test_a_dispatch_table_and_punctuation_are_logic(self) -> None: source = f"TABLE = {{{names}}}\nMARKS = ('.', '!', '?', ':', ';', ',', '|')\n" self.assertEqual([], vocabulary_in(source, self.DATA)) - def test_flags_and_environment_names_with_an_underscore_are_not_words(self) -> None: + def test_flags_paths_and_underscored_names_are_not_words(self) -> None: source = ( 'ARGS = ("--unified=0", "--no-color", "--no-ext-diff", "-z", "--name-only", "--cached")\n' + 'PATHS = ("docs/notes", "src/app", "repo-config/labels", "a/b", "x/y", "lib/core", ' + '"tests\\\\data")\n' 'GIT = frozenset({"GIT_DIR", "GIT_WORK_TREE", "GIT_INDEX_FILE", "GIT_PREFIX", ' '"GIT_NAMESPACE", "GIT_COMMON_DIR"})\n' ) From 93ba9d90fc322cbd067dd618b22797b3528d96b0 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Sun, 25 Oct 2026 11:22:01 -0700 Subject: [PATCH 2/2] Give Backslash Paths Their Own Case in the Vocabulary Check One backslash path among six slash paths could not cross the cap by itself, so a pattern accepting backslashes alone would pass. Six of each now sit in a tuple apiece. Co-Authored-By: Claude Opus 5.5 --- tests/test_prose_lint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_prose_lint.py b/tests/test_prose_lint.py index 0967e7d8..64a6285b 100755 --- a/tests/test_prose_lint.py +++ b/tests/test_prose_lint.py @@ -7609,8 +7609,8 @@ def test_a_dispatch_table_and_punctuation_are_logic(self) -> None: def test_flags_paths_and_underscored_names_are_not_words(self) -> None: source = ( 'ARGS = ("--unified=0", "--no-color", "--no-ext-diff", "-z", "--name-only", "--cached")\n' - 'PATHS = ("docs/notes", "src/app", "repo-config/labels", "a/b", "x/y", "lib/core", ' - '"tests\\\\data")\n' + 'PATHS = ("docs/notes", "src/app", "repo-config/labels", "a/b", "x/y", "lib/core")\n' + 'WINDOWS = ("docs\\\\notes", "src\\\\app", "a\\\\b", "x\\\\y", "lib\\\\core", "c\\\\d")\n' 'GIT = frozenset({"GIT_DIR", "GIT_WORK_TREE", "GIT_INDEX_FILE", "GIT_PREFIX", ' '"GIT_NAMESPACE", "GIT_COMMON_DIR"})\n' )