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

STY: Apply fixes suggested by pylint #999

Merged
merged 4 commits into from Jun 16, 2022
Merged

STY: Apply fixes suggested by pylint #999

merged 4 commits into from Jun 16, 2022

Conversation

MartinThoma
Copy link
Member

@MartinThoma MartinThoma commented Jun 16, 2022

  • Use f-strings: They are IMHO more readable and faster than other formatting options
  • Reduce code duplication
  • Improvements in type annotations
  • Add PyPDF2 help text

@MartinThoma MartinThoma force-pushed the pylint branch 3 times, most recently from 141c787 to 5212b5f Compare June 16, 2022 09:22
* Use f-strings: They are more readable and faster than other
                 string formatting options
@codecov
Copy link

codecov bot commented Jun 16, 2022

Codecov Report

Merging #999 (9c686e7) into main (6ce36f7) will increase coverage by 0.06%.
The diff coverage is 82.66%.

@@            Coverage Diff             @@
##             main     #999      +/-   ##
==========================================
+ Coverage   87.48%   87.55%   +0.06%     
==========================================
  Files          18       18              
  Lines        4124     4113      -11     
  Branches      876      870       -6     
==========================================
- Hits         3608     3601       -7     
+ Misses        340      337       -3     
+ Partials      176      175       -1     
Impacted Files Coverage Δ
PyPDF2/__init__.py 100.00% <ø> (ø)
PyPDF2/_page.py 90.15% <0.00%> (ø)
PyPDF2/filters.py 81.75% <66.66%> (-0.06%) ⬇️
PyPDF2/_merger.py 69.68% <71.42%> (-0.25%) ⬇️
PyPDF2/_reader.py 83.01% <73.33%> (ø)
PyPDF2/generic.py 91.10% <85.71%> (+0.13%) ⬆️
PyPDF2/_writer.py 88.20% <90.00%> (+0.04%) ⬆️
PyPDF2/_utils.py 98.02% <90.90%> (ø)
PyPDF2/_cmap.py 83.23% <100.00%> (ø)
PyPDF2/_security.py 97.40% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ce36f7...9c686e7. Read the comment docs.

@MartinThoma MartinThoma marked this pull request as ready for review June 16, 2022 11:46
@MartinThoma MartinThoma merged commit faebc9d into main Jun 16, 2022
@MartinThoma MartinThoma deleted the pylint branch June 16, 2022 11:58
MartinThoma added a commit that referenced this pull request Jun 17, 2022
Performance Improvements (PI):
-  Remove b_ calls (#992, #986)
-  Apply improvements to _utils suggested by perflint (#993)

Robustness (ROB):
-  utf-16-be\' codec can\'t decode (...) (#995)

Documentation (DOC):
-  Remove reference to Scripts (#987)

Developer Experience (DEV):
-  Fix type annotations for add_bookmarks (#1000)

Testing (TST):
-  Add test for PdfMerger (#1001)
-  Add tests for XMP information (#996)
-  reader.get_fields / zlib issue / LZW decode issue (#1004)
-  reader.get_fields with report generation (#1002)
-  Improve test coverage by extracting texts (#998)

Code Style (STY):
-  Apply fixes suggested by pylint (#999)

Full Changelog: 2.2.0...2.2.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.

None yet

1 participant