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: Slightly increase readability #3098

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

STY: Slightly increase readability #3098

wants to merge 4 commits into from

Conversation

j-t-1
Copy link
Contributor

@j-t-1 j-t-1 commented Jan 31, 2025

No description provided.

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.51%. Comparing base (c914a62) to head (a69bd07).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3098      +/-   ##
==========================================
+ Coverage   96.48%   96.51%   +0.03%     
==========================================
  Files          52       53       +1     
  Lines        8808     8875      +67     
  Branches     1613     1622       +9     
==========================================
+ Hits         8498     8566      +68     
  Misses        185      185              
+ Partials      125      124       -1     

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

pypdf/_page.py Outdated
index = len_self + index
if index < 0 or index >= len_self:
index += len_self
if not 0 <= index < len_self:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this - for me, the old variant is easier to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you get used to it is quicker to parse.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly have some doubts about this and the old way, the grouping has been easier to grasp - even when dealing with Python code on a daily basis. This needs some further thinking about before merging.

@stefan6419846 stefan6419846 added the on-hold PR requests that need clarification before they can be merged.A comment must give details label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold PR requests that need clarification before they can be merged.A comment must give details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants