File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -343,15 +343,15 @@ def read_int64(self) -> int:
343343 def unpack_uint16 (self , n : bytes ) -> int :
344344 return struct .unpack ('<H' , n [0 :2 ])[0 ]
345345
346- def unpack_int24 (self , n : bytes ) -> Optional [str , Tuple [str , int ]]:
346+ def unpack_int24 (self , n : bytes ) -> Optional [Union [ int , Tuple [str , int ] ]]:
347347 try :
348348 return struct .unpack ('B' , n [0 ])[0 ] \
349349 + (struct .unpack ('B' , n [1 ])[0 ] << 8 ) \
350350 + (struct .unpack ('B' , n [2 ])[0 ] << 16 )
351351 except TypeError :
352352 return n [0 ] + (n [1 ] << 8 ) + (n [2 ] << 16 )
353353
354- def unpack_int32 (self , n : bytes ) -> Optional [str , Tuple [str , int ]]:
354+ def unpack_int32 (self , n : bytes ) -> Optional [Union [ int , Tuple [str , int ] ]]:
355355 try :
356356 return struct .unpack ('B' , n [0 ])[0 ] \
357357 + (struct .unpack ('B' , n [1 ])[0 ] << 8 ) \
You can’t perform that action at this time.
0 commit comments