-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
is-maintenanceAnything that is just internal: Simplifying code, syntax changes, updating docs, speed improvementsAnything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements
Description
Explanation
From #3365 (comment):
Remaining max-complexity greater than 30
- pypdf/_writer.py, remove_objects_from_page: 31
- pypdf/_writer.py, merge: 31
- pypdf/generic/_data_structures.py, read_from_stream: 34
- tests/test_page.py, test_extract_text_visitor_callbacks: 37
We should try to refactor these methods where possible to reduce the complexity. The complexity mostly is due to functions nested inside methods. Getting rid of the nesting should fix the complexity.
-
PdfWriter.remove_objects_from_page -
PdfWriter.merge -
DictionaryObject.read_from_stream -
test_extract_text_visitor_callback - Reduce
tool.ruff.lint.mccabevalue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
is-maintenanceAnything that is just internal: Simplifying code, syntax changes, updating docs, speed improvementsAnything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements