DEV: Refine type annotation for Page.rotate#1021
Closed
SXHRYU wants to merge 1 commit intopy-pdf:mainfrom
SXHRYU:patch-1
Closed
DEV: Refine type annotation for Page.rotate#1021SXHRYU wants to merge 1 commit intopy-pdf:mainfrom SXHRYU:patch-1
SXHRYU wants to merge 1 commit intopy-pdf:mainfrom
SXHRYU:patch-1
Conversation
Increments of 90 cannot be float. You can, of course, put `angle=180.0`, but this looks anti-pythonic.
MasterOdin
requested changes
Jun 23, 2022
| return PageObject.create_blank_page(pdf, width, height) | ||
|
|
||
| def rotate(self, angle: float) -> "PageObject": | ||
| def rotate(self, angle: int) -> "PageObject": |
Member
There was a problem hiding this comment.
You'll want to apply this change to the deprecated rotate_clockwise, rotateClockwise, and rotateCounterClockwise function signatures so that mypy is happy.
Member
|
@SXHRYU Thank you for the PR! Have you seen the comment by @MasterOdin ? Do you need help with that? |
MartinThoma
added a commit
that referenced
this pull request
Jul 10, 2022
Closes #1021 Co-authored-by: probel_hero <93727145+SXHRYU@users.noreply.github.com>
MartinThoma
added a commit
that referenced
this pull request
Jul 10, 2022
Closes #1021 Co-authored-by: probel_hero <93727145+SXHRYU@users.noreply.github.com>
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.
Increments of 90 cannot be float. You can, of course, put
angle=180.0, but this looks anti-pythonic.