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: Add type annotations #854

Merged
merged 28 commits into from May 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1c0e9aa
MAINT: Use Python 3.6 language features (#849)
MartinThoma May 1, 2022
4490f53
MAINT: Add type annotations
MartinThoma May 2, 2022
de12c40
More types
MartinThoma May 2, 2022
473e52e
More types + typeguard
MartinThoma May 4, 2022
d72b979
Make mypy happy
MartinThoma May 5, 2022
6442bae
Add types and ignores
MartinThoma May 6, 2022
daad92e
Remove unused imports
MartinThoma May 6, 2022
107cdc9
Merge branch '2.0.0-dev' into more-types
MartinThoma May 7, 2022
b925866
BUG: Potential None attribute access
MartinThoma May 7, 2022
7b0bc46
Many type refinements
MartinThoma May 7, 2022
77811c0
Fix Flake8
MartinThoma May 7, 2022
d7fe099
Fix for Python 3.10
MartinThoma May 7, 2022
5858759
More type ignores
MartinThoma May 7, 2022
3851256
More ignores
MartinThoma May 7, 2022
f671101
Potential bug with _alg33_1
MartinThoma May 7, 2022
053f813
More precise types
MartinThoma May 7, 2022
b9530e8
Fix import loop issue of generic
MartinThoma May 7, 2022
7f98641
Remove unnecessary ignores
MartinThoma May 7, 2022
0b952cb
Further improvements
MartinThoma May 7, 2022
613b733
Remove unneded type ignores
MartinThoma May 7, 2022
95d5ba7
Replace ignores by casts
MartinThoma May 7, 2022
50456f5
Simplify
MartinThoma May 8, 2022
79560fa
OutlinesType
MartinThoma May 8, 2022
5c0a40d
Type refinements
MartinThoma May 8, 2022
b4581a8
Fix typo
MartinThoma May 8, 2022
b9c76e4
BUG: Fix missing return
MartinThoma May 8, 2022
b5b646c
TST: PageLayout
MartinThoma May 8, 2022
3d4b1ba
TST: Page transformations
MartinThoma May 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/github-ci.yaml
Expand Up @@ -54,7 +54,7 @@ jobs:
if: matrix.python-version == '3.10.1'
- name: Test with mypy
run : |
mypy PyPDF2 --show-error-codes
mypy PyPDF2 --show-error-codes --disallow-untyped-defs --disallow-incomplete-defs
- name: Upload coverage data
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG
Expand Up @@ -5,8 +5,10 @@ Deprecations (DEP):
- PyPDF2 2.0 requires Python 3.6+. Python 2.7 and 3.5 support were dropped.
- PdfFileReader and PdfFileMerger no longer have the `overwriteWarnings`
parameter. The new behavior is `overwriteWarnings=False`.
- PdfFileReader: The "warndest" parameter was removed
- merger: OutlinesObject was removed.
- utils:
* `ConvertFunctionsToVirtualList` was removed
* `formatWarning` was removed
* `isInt(obj)`: Use `instance(obj, int)` instead
* `u_(s)`: Use `s` directly
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Expand Up @@ -19,6 +19,9 @@ clean:
test:
pytest tests --cov --cov-report term-missing -vv --cov-report html --durations=3 --timeout=30

testtype:
pytest tests --cov --cov-report term-missing -vv --cov-report html --durations=3 --timeout=30 --typeguard-packages=PyPDF2

mutation-test:
mutmut run

Expand Down