@@ -861,7 +861,9 @@ def _build_outline(self, node: DictionaryObject) -> Optional[Destination]:
861861 elif isinstance (dest , str ):
862862 # named destination, addresses NameObject Issue #193
863863 try :
864- outline = self ._build_destination (title , self ._namedDests [dest ].dest_array ) # type: ignore
864+ outline = self ._build_destination (
865+ title , self ._namedDests [dest ].dest_array
866+ )
865867 except KeyError :
866868 # named destination not found in Name Dict
867869 outline = self ._build_destination (title , None )
@@ -1045,7 +1047,7 @@ def _get_object_from_stream(
10451047 stmnum , idx = self .xref_objStm [indirect_reference .idnum ]
10461048 obj_stm : EncodedStreamObject = IndirectObject (stmnum , 0 , self ).get_object () # type: ignore
10471049 # This is an xref to a stream, so its type better be a stream
1048- assert obj_stm ["/Type" ] == "/ObjStm"
1050+ assert cast ( str , obj_stm ["/Type" ]) == "/ObjStm"
10491051 # /N is the number of indirect objects in the stream
10501052 assert idx < obj_stm ["/N" ]
10511053 stream_data = BytesIO (b_ (obj_stm .get_data ())) # type: ignore
@@ -1501,7 +1503,7 @@ def _read_pdf15_xref_stream(
15011503 stream .seek (- 1 , 1 )
15021504 idnum , generation = self .read_object_header (stream )
15031505 xrefstream = cast (ContentStream , read_object (stream , self ))
1504- assert xrefstream ["/Type" ] == "/XRef"
1506+ assert cast ( str , xrefstream ["/Type" ]) == "/XRef"
15051507 self .cache_indirect_object (generation , idnum , xrefstream )
15061508 stream_data = BytesIO (b_ (xrefstream .get_data ()))
15071509 # Index pairs specify the subsections in the dictionary. If
0 commit comments