-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
DEV: Unify mypy options and warn redundant workarounds #2223
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2223 +/- ##
==========================================
- Coverage 94.36% 94.36% -0.01%
==========================================
Files 43 43
Lines 7591 7589 -2
Branches 1498 1497 -1
==========================================
- Hits 7163 7161 -2
Misses 264 264
Partials 164 164
☔ View full report in Codecov by Sentry. |
- name: Test with mypy | ||
run : | | ||
mypy pypdf |
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.
Does mypy behave the same for different Python versions?
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.
i simply checked py3.8 ~ py3.11, they behaved the same. but for py3.6, probably it's not.
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.
Lets see if I get good answers for this via https://stackoverflow.com/q/77219925/562769
I suspect that it should give the same results, so I tend to agree with this change.
Thank you very much for the cleanup 🙏 |
Running mypy for Python 3.10 I now get:
I wonder if that has an effect on code using pypdf. If it has, we need to fix it. |
I'll leave it like that for the moment as your change made the code a lot easier to read. However, if the CI of users fails due to that I'll revert many of the changes. |
## What's new ### Bug Fixes (BUG) - invalid cm/tm in visitor functions (#2206) by @pubpub-zz - Encrypt / decrypt Stream object dictionaries (#2228) by @pilotandy - Support nested color spaces for the /DeviceN color space (#2241) by @Stefan - images property fails if NullObject in list (#2215) by @pubpub-zz ### Robustness (ROB) - XYZ destination to cope with missing left and top param (#2237) by @pubpub-zz ### Documentation (DOC) - Add pilotandy for #2228 as a contributor by @MartinThoma - Link to CONTRIBUTING.md in README.md (#2232) by @markpfeifle - Changelog by @MartinThoma ### Developer Experience (DEV) - Exclude tests from mypy checks by @MartinThoma - Unify mypy options and warn redundant workarounds (#2223) by @exiledkingcc - Stabilize Pillow test with Pillow missing (#2229) by @Stefan ### Maintenance (MAINT) - Update pinned packages (#2243) by @MartinThoma ### Testing (TST) - Regression test against non-deterministic accidental object reuse (#2244) by @MartinThoma [Full Changelog](3.16.2...3.16.3)
No description provided.