-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Change exception type for incorrect SVG date metadata #23206
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
Conversation
0b0f279
to
3dafa4c
Compare
Edit: It seems like Edit 2: And it was one of my other PRs that removed it... |
a4df519
to
31455aa
Compare
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.
There seems to be a mix of .format
and f-strings, and I don't see a reason why they should differ.
I guess that was a copy-and-paste thing, where I changed at some stage. Now it is refactored and uses some common check-and-error functions to avoid code duplication. (Didn't find it worthwhile to make it flexible enough to also deal with the different date formats.) |
54ca556
to
2766d49
Compare
0338b6f
to
d4e8a5f
Compare
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.
Can you update the commit message to match the PR title?
Sure. Is the general rule that one should include that much info? I did it on purpose as saying SVG in a commit affecting backend_svg seems a bit bloated... |
I dunno, "Better error messages" sounds too vague to me, while "Fix some typos" is vague enough to not need specifics... |
PR Summary
Better checking of metadata with better error messages. Tests for all metadata errors (changed ValueError to TypeError as should be more appropriate, release note required?).
Test for
_escape_attrib
.PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).