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

DOC: Use google-style docstrings in _page.py #1503

Merged
merged 3 commits into from Dec 17, 2022
Merged

Conversation

MartinThoma
Copy link
Member

@MartinThoma MartinThoma commented Dec 15, 2022

This PR is a step towards Google-style docstrings.

  • I think they are way easier to read within the source code
  • We don't have the type annotation + the type in the docstring. This is a pro (no duplication) and a con (less control over how it's shown in the docs)

Deprecated methods were not touched

@MartinThoma
Copy link
Member Author

This is what I mean with the readability:

image

@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Base: 92.03% // Head: 92.57% // Increases project coverage by +0.54% 🎉

Coverage data is based on head (17632b0) compared to base (9b23a39).
Patch has no changes to coverable lines.

❗ Current head 17632b0 differs from pull request most recent head e089e80. Consider uploading reports for the commit e089e80 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1503      +/-   ##
==========================================
+ Coverage   92.03%   92.57%   +0.54%     
==========================================
  Files          32       32              
  Lines        5976     5970       -6     
  Branches     1163     1163              
==========================================
+ Hits         5500     5527      +27     
+ Misses        312      284      -28     
+ Partials      164      159       -5     
Impacted Files Coverage Δ
PyPDF2/_page.py 91.96% <ø> (+2.39%) ⬆️
PyPDF2/xmp.py 92.10% <0.00%> (ø)
PyPDF2/types.py 100.00% <0.00%> (ø)
PyPDF2/errors.py 100.00% <0.00%> (ø)
PyPDF2/_merger.py 93.18% <0.00%> (ø)
PyPDF2/_reader.py 90.32% <0.00%> (ø)
PyPDF2/generic/_data_structures.py 89.97% <0.00%> (ø)
PyPDF2/_writer.py 85.11% <0.00%> (+1.16%) ⬆️
PyPDF2/_utils.py 99.47% <0.00%> (+2.01%) ⬆️
... and 1 more

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MartinThoma MartinThoma merged commit e5e26ad into main Dec 17, 2022
@MartinThoma MartinThoma deleted the google-style-docstrings branch December 17, 2022 07:53
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