ENH: Add rotate method for PageObject#913
Conversation
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #913 +/- ##
==========================================
- Coverage 77.89% 77.81% -0.08%
==========================================
Files 16 16
Lines 4324 4327 +3
Branches 813 812 -1
==========================================
- Hits 3368 3367 -1
- Misses 784 788 +4
Partials 172 172
Continue to review full report at Codecov.
|
|
Thank you for the PR! I was first a bit uncertain, because the new name is less clear than the old one. However, the documentation is clear and the name is brief + consistent with the |
I'm not going to get religious on that 😄 I try to keep this logic:
If something contains deprecations + other stuff (e.g. fixing typos, adding a new function) I would still go with DEP as it requires users attention. I've set the order like this in the changelog: https://github.com/py-pdf/PyPDF2/blob/main/make_changelog.py#L66 The parts that are most important for users to notice should be on the top in the changelog message |
Closes #896
This adds a
rotatemethod toPageObjectto be used instead ofrotate_clockwise, which is now marked as deprecated. The intent here is that given that there's going to be only one method to rotate thePdfObjectin the future, there's not much point in having it be suffixed with the direction as the direction can just be documented, and then save everyone some keystrokes in usage.As an aside, wasn't really sure what "type" to give this PR, whether it should be
DEP,ENH,MAINTor some other one. 🤷