Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan6419846 authored Mar 16, 2024
1 parent 73e42fd commit bd37bb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pypdf/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@ def clean_forms(
elt: DictionaryObject, stack: List[DictionaryObject]
) -> Tuple[List[str], List[str]]:
nonlocal to_delete
# elt in recursive is a new contentstream object so we have to check the indirect_reference
# elt in recursive call is a new ContentStream object, so we have to check the indirect_reference
if (elt in stack) or (
hasattr(elt, "indirect_reference")
and any(
Expand Down Expand Up @@ -1970,7 +1970,7 @@ def clean_forms(
except AttributeError: # pragma: no cover
pass
stack.append(elt)
clean_forms(content, stack) # clean sub forms
clean_forms(content, stack) # clean subforms
if content is not None:
if isinstance(v, IndirectObject):
self._objects[v.idnum - 1] = content
Expand Down

0 comments on commit bd37bb6

Please sign in to comment.