DEV: Unify mypy options and warn redundant workarounds#2223
DEV: Unify mypy options and warn redundant workarounds#2223MartinThoma merged 4 commits intopy-pdf:mainfrom
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.
Does mypy behave the same for different Python versions?
There was a problem hiding this comment.
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.
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.