Repository navigation
Annotations: raise a clear error for a negative or non-finite border_width - #2133
Merged
andersonhc merged 1 commit intoNov 9, 2026
Merged
Conversation
RavSinghChandan
force-pushed
the
annotation-border-width-finite
branch
from
November 9, 2026 13:22
d94de3d to
a13b6ba
Compare
andersonhc
approved these changes
Nov 9, 2026
RavSinghChandan
force-pushed
the
annotation-border-width-finite
branch
from
November 9, 2026 14:49
a13b6ba to
a26aace
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
pdf.link(10, 10, 20, 5, url, border_width=float("nan"))wrote/Border [0 0 nan]into the annotation, andinfor a negative width went through the same way. The same applies to the other annotation methods that take aborder_width, such asink_annotation()andfree_text_annotation().The annotation now raises
ValueError: Annotation border width must be zero or a positive number: ..., next to the check on its position and size from #2126. Addedtest_annotation_invalid_border_width(fails on master).CHANGELOG.md