-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MAINT: Remove unused variables #3088
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
Conversation
Specifically CUSTOM_RTL_MIN, CUSTOM_RTL_MAX, and CUSTOM_RTL_SPECIAL_CHARS.
As these are global varibles, deleting them may not be the correct thing to do. This PR will need checking by someone who understands this function well. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3088 +/- ##
=======================================
Coverage 96.50% 96.50%
=======================================
Files 52 52
Lines 8807 8807
Branches 1612 1612
=======================================
Hits 8499 8499
Misses 183 183
Partials 125 125 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Are they really unused? https://github.com/search?q=repo%3Apy-pdf%2Fpypdf%20CUSTOM_RTL_MIN&type=code indicates otherwise. Edit: It seems like at least in |
Text extraction is hard, as described in our docs. At the moment I do not understand how this function works, and will need to read the PDF specification as well. I think we need to focus resources on trying to reduce its complexity, which is currently 54 using tool.ruff.lint.mccabe. |
There already is #3010 for tracking this, although from my side there will not change much in the short term as it just works. In the light of your last comment, how do you propose to go forward with this PR? |
Did not know about the issue. Doing what you did and searching the codebase for the variables, they are only used in tests. Happy with this PR as is. The function may by necessity be this complex. I will try in future PRs to make it more readable even if just comments. |
Judging from the |
Specifically CUSTOM_RTL_MIN, CUSTOM_RTL_MAX, and CUSTOM_RTL_SPECIAL_CHARS.