info: inconsistent types used in ContentsInfo.name_index

This broke PyPy but CPython is fine with it.
This commit is contained in:
James R. Barlow
2021-08-28 00:18:14 -07:00
parent cb6c1939e9
commit 95d9e8d91a
+2 -2
View File
@@ -113,7 +113,7 @@ class ContentsInfo(NamedTuple):
inline_images: List[InlineSettings]
found_vector: bool
found_text: bool
name_index: Mapping[Object, List[XobjectSettings]]
name_index: Mapping[str, List[XobjectSettings]]
class TextboxInfo(NamedTuple):
@@ -209,7 +209,7 @@ def _interpret_contents(contentstream: Object, initial_shorthand=UNIT_SQUARE):
name=image_name, shorthand=ctm.shorthand, stack_depth=len(stack)
)
xobject_settings.append(settings)
name_index[image_name].append(settings)
name_index[str(image_name)].append(settings)
elif operator == 'INLINE IMAGE': # BI/ID/EI are grouped into this
iimage = operands[0]
inline = InlineSettings(