Skip to content
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

MAINT: Enable disallow_any_generics and add missing generics. #2278

Merged
merged 4 commits into from
Nov 14, 2023

Conversation

nilehmann
Copy link
Contributor

@nilehmann nilehmann commented Oct 30, 2023

Follow up on #2272

Enable the disallow_any_generics option and add missing generics. Also, add some overloaded versions of apply_on to avoid some casts.

I'm not sure what's the best way to fix this, but EncryptAlgorihm gives me TypeError: 'EncryptAlgorithm': too many data types: [<class 'tuple'>, <class 'typing.Generic'>] if I make it a subclass of Tupe[Any, ...] so I left it as is and ignored the error.

@nilehmann
Copy link
Contributor Author

Hmmm, I don't see how the failing test is related to my changes. Could it be a spurious failure?

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c411a1e) 94.39% compared to head (011bf76) 94.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2278   +/-   ##
=======================================
  Coverage   94.39%   94.39%           
=======================================
  Files          43       43           
  Lines        7654     7654           
  Branches     1513     1513           
=======================================
  Hits         7225     7225           
  Misses        266      266           
  Partials      163      163           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MartinThoma MartinThoma changed the title Enable disallow_any_generics and add missing generics. MAINT: Enable disallow_any_generics and add missing generics. Nov 14, 2023
@MartinThoma MartinThoma merged commit 22eee75 into py-pdf:main Nov 14, 2023
14 checks passed
@MartinThoma
Copy link
Member

@nilehmann Thank your for the improvements! It will be part of the next release (latest in ~2 weeks)

MartinThoma added a commit that referenced this pull request Dec 10, 2023
## What's new

### Bug Fixes (BUG)
-  Cope with deflated images with CMYK Black Only (#2322) by @pubpub-zz
-  Handle indirect objects as parameters for CCITTFaxDecode (#2307) by @stefan6419846
-  check words length in _cmap type1_alternative function (#2310) by @Takher

### Robustness (ROB)
-  Relax flate decoding for too many lookup values (#2331) by @stefan6419846
-  Let _build_destination skip in case of missing /D key (#2018) by @nickryand

### Documentation (DOC)
-  Note in reading form data (#2338) by @MartinThoma
-  Pull Request prefixes and size by @MartinThoma
-  Add https://github.com/zuypt for #2325 as a contributor by @MartinThoma
-  Fix docstring for RunLengthDecode.decode (#2302) by @stefan6419846

### Maintenance (MAINT)
-  Enable `disallow_any_generics` and add missing generics (#2278) by @nilehmann

### Testing (TST)
-  Centralize file downloads (#2324) by @MartinThoma

### Code Style (STY)
-  Fix typo "steam" \xe2\x86\x92 "stream" (#2327) by @stefan6419846
-  Run black by @MartinThoma
-  Make Traceback in bug report template uppercase (#2304) by @stefan6419846

[Full Changelog](3.17.1...3.17.2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants