Skip to content

MAINT: Split generic.py#1229

Merged
MartinThoma merged 2 commits into
mainfrom
generic-split
Aug 13, 2022
Merged

MAINT: Split generic.py#1229
MartinThoma merged 2 commits into
mainfrom
generic-split

Conversation

@MartinThoma

@MartinThoma MartinThoma commented Aug 13, 2022

Copy link
Copy Markdown
Member

The aim of this refactoring PR is to explicitly define the interface of PyPDF2.generic via __all__ and to structure this big submodule more. I hope this makes it easier to test / expand in future if necessary. Smaller modules should have less merge conflicts.

This PR should not change anything for users of PyPDF2.

@MartinThoma
MartinThoma force-pushed the generic-split branch 5 times, most recently from 56c59d9 to e27b272 Compare August 13, 2022 17:22
@codecov

codecov Bot commented Aug 13, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1229 (b7dfc2e) into main (41e05f8) will increase coverage by 0.06%.
The diff coverage is 91.96%.

@@            Coverage Diff             @@
##             main    #1229      +/-   ##
==========================================
+ Coverage   92.58%   92.65%   +0.06%     
==========================================
  Files          24       30       +6     
  Lines        4939     4981      +42     
  Branches     1025     1026       +1     
==========================================
+ Hits         4573     4615      +42     
  Misses        229      229              
  Partials      137      137              
Impacted Files Coverage Δ
PyPDF2/_writer.py 89.44% <86.66%> (-0.08%) ⬇️
PyPDF2/generic/_data_structures.py 89.54% <89.54%> (ø)
PyPDF2/generic/_utils.py 89.69% <89.69%> (ø)
PyPDF2/generic/_base.py 95.38% <95.38%> (ø)
PyPDF2/generic/_annotations.py 96.29% <96.29%> (ø)
PyPDF2/constants.py 100.00% <100.00%> (ø)
PyPDF2/generic/__init__.py 100.00% <100.00%> (ø)
PyPDF2/generic/_outline.py 100.00% <100.00%> (ø)
PyPDF2/generic/_rectangle.py 100.00% <100.00%> (ø)
PyPDF2/types.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@MartinThoma

MartinThoma commented Aug 13, 2022

Copy link
Copy Markdown
Member Author

pyreverse -p . -o pdf PyPDF2/generic -k gives:

image

@MartinThoma
MartinThoma merged commit a85148a into main Aug 13, 2022
@MartinThoma
MartinThoma deleted the generic-split branch August 13, 2022 20:03
MartinThoma added a commit that referenced this pull request Aug 15, 2022
Bug Fixes (BUG):
-  TreeObject.remove_child had a non-PdfObject assignment for Count (#1233, #1234)
-  Fix stream truncated prematurely (#1223)

Documentation (DOC):
-  Fix docstring formatting (#1228)

Maintenance (MAINT):
-  Split generic.py (#1229)

Testing (TST):
-  Decrypt AlgV4 with owner password (#1239)
-  AlgV5.generate_values (#1238)
-  TreeObject.remove_child / empty_tree (#1235, #1236)
-  create_string_object (#1232)
-  Free-Text annotations (#1231)
-  generic._base (#1230)
-  Strict get fonts (#1226)
-  Increase PdfReader coverage (#1219, #1225)
-  Increase PdfWriter coverage (#1237)
-  100% coverage for utils.py (#1217)
-  Writer exception non-binary stream (#1218)
-  Don't check coverage for deprecated code (#1216)

Full Changelog: 2.10.0...2.10.1
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.

1 participant