Skip to content

Commit 524ffc3

Browse files
committed
Update _page.py
fixed code style
1 parent 557d77d commit 524ffc3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pypdf/_page.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -462,16 +462,16 @@ def _get_ids_image(
462462
if RES.PATTERN in cast(DictionaryObject, obj[PG.RESOURCES]):
463463
for patternName, pattern in obj[PG.RESOURCES][RES.PATTERN].items():
464464
if PG.RESOURCES in pattern.get_object() and RES.XOBJECT in cast(DictionaryObject, pattern[PG.RESOURCES]):
465-
x_object = pattern[PG.RESOURCES][RES.XOBJECT].get_object() # type: ignore
466-
for o in x_object:
467-
if not isinstance(x_object[o], StreamObject):
468-
continue
469-
if x_object[o][IA.SUBTYPE] == "/Image":
470-
lst.append(
471-
f"{RES.PATTERN}{patternName}{o}"
472-
if len(ancest) == 0
473-
else ancest + [o]
474-
)
465+
x_object = pattern[PG.RESOURCES][RES.XOBJECT].get_object() # type: ignore
466+
for o in x_object:
467+
if not isinstance(x_object[o], StreamObject):
468+
continue
469+
if x_object[o][IA.SUBTYPE] == "/Image":
470+
lst.append(
471+
f"{RES.PATTERN}{patternName}{o}"
472+
if len(ancest) == 0
473+
else ancest + [o]
474+
)
475475

476476
if RES.XOBJECT in cast(DictionaryObject, obj[PG.RESOURCES]):
477477
x_object = obj[PG.RESOURCES][RES.XOBJECT].get_object() # type: ignore

0 commit comments

Comments
 (0)