-
Notifications
You must be signed in to change notification settings - Fork 161
Fix inconsistent malformed-transform handling (with strict=True opt-in) #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d91e3f2
Degrade to identity on a malformed transform substring
be2c7ae
Fix inconsistent malformed-transform handling; add strict=True opt-in
mathandy ef729ff
Add type annotations to transform-parsing functions
mathandy 7890aa1
Tighten transform validation per review
mathandy d43f0cd
Accept trailing separator commas and 'none' silently
mathandy 3e7a803
Reformat docstrings to satisfy pydocstyle (D202/D205/D209/D213/D415)
mathandy 0e2dd68
Make parser.py fully pydocstyle-clean
mathandy 4ce75b0
Expose strict transform parsing via loaders and SVGSyntaxWarning
mathandy 3016142
Add type annotations to parse_path
mathandy 04eff4f
Validate values against the SVG number grammar; review follow-ups
mathandy 709daba
Close the SVG file deterministically in SaxDocument.sax_parse
mathandy f52c304
Guard Element import behind TYPE_CHECKING; pin pydocstyle convention
mathandy 10c472b
Drop comment from pydocstyle config
mathandy bcbbb74
Update version to 1.8.0
mathandy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,7 @@ | |
| universal = 1 | ||
|
|
||
| [metadata] | ||
| license_file = LICENSE.txt | ||
| license_file = LICENSE.txt | ||
|
|
||
| [pydocstyle] | ||
| convention = pep257 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Reject commas that are not valid transform separators.
Line 45 accepts
,translate(1)andtranslate(1),,rotate(30)in strict mode. Neither comma separates two transforms. Track whether a previous transform exists, and allow at most one comma only after that transform. Add strict-mode regression tests for both inputs.🤖 Prompt for AI Agents