Skip to content

Tidy what a removed path leaves in scrubbed error text - #28

Merged
abrignoni merged 1 commit into
mainfrom
fix/scrub-tidy-and-shape-test
Sep 3, 2026
Merged

abrignoni merged 1 commit into
mainfrom
fix/scrub-tidy-and-shape-test

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Tidies what a removed path leaves behind in scrubbed error text.

scrub_local_paths dropped the path and kept its surroundings: empty brackets, a space before the punctuation that followed it, and, with the archive messages' colon-then-path shape, "directory: )" inside the brackets. The stored text now reads "cannot open the source archive ([Errno 2] No such file or directory)".

  • three tidy rules after the path removals, with a docstring sentence
  • two tests brought over from Keep the zip's path out of stored source-archive errors #27 and adapted to the merged wording: the tidy rules on plain strings, and _process_one driven with the zip's recorded path in POSIX, Windows-drive and UNC shapes, zipfile stood in so no platform resolves a foreign drive or a UNC host; the shape test failed on main on all three

🤖 Generated with Claude Code

scrub_local_paths removed a path and left its surroundings behind: empty
brackets, a space before the punctuation that followed it, and, with the archive
messages' colon-then-path shape, "directory: )" inside the brackets. The stored
text now reads "cannot open the source archive ([Errno 2] No such file or
directory)".

Two tests come over from the closed #27, adapted to the merged wording: one pins
the tidy rules on plain strings, and one drives _process_one with the zip's
recorded path in POSIX, Windows-drive and UNC shapes, with zipfile stood in so
no platform resolves a foreign drive or a UNC host, and asserts the exact stored
text. The shape test failed on the merged code on all three shapes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@abrignoni
abrignoni merged commit d62cb71 into main Sep 3, 2026
8 checks passed
@abrignoni
abrignoni deleted the fix/scrub-tidy-and-shape-test branch September 3, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant