22from io import BytesIO , IOBase
33
44import builtins
5- from typing import Callable , Union
5+ from typing import Callable , Sequence , Union
66
77from ..math import Color , Matrix4x4 , Quaternion , Vector2 , Vector3 , Vector4 , Rectangle
88
@@ -144,7 +144,7 @@ def write_matrix(self, value: Matrix4x4):
144144 for val in value .M :
145145 self .write_float (val )
146146
147- def write_array (self , command : Callable , value : list , write_length : bool = True ):
147+ def write_array (self , command : Callable , value : Sequence , write_length : bool = True ):
148148 if write_length :
149149 self .write_int (len (value ))
150150 for val in value :
@@ -154,29 +154,29 @@ def write_byte_array(self, value: builtins.bytes):
154154 self .write_int (len (value ))
155155 self .write (value )
156156
157- def write_boolean_array (self , value : list ):
157+ def write_boolean_array (self , value : Sequence ):
158158 self .write_array (self .write_boolean , value )
159159
160- def write_u_short_array (self , value : list ):
160+ def write_u_short_array (self , value : Sequence ):
161161 self .write_array (self .write_u_short , value )
162162
163- def write_int_array (self , value : list , write_length : bool = False ):
163+ def write_int_array (self , value : Sequence , write_length : bool = False ):
164164 return self .write_array (self .write_int , value , write_length )
165165
166- def write_u_int_array (self , value : list , write_length : bool = False ):
166+ def write_u_int_array (self , value : Sequence , write_length : bool = False ):
167167 return self .write_array (self .write_u_int , value , write_length )
168168
169- def write_float_array (self , value : list , write_length : bool = False ):
169+ def write_float_array (self , value : Sequence , write_length : bool = False ):
170170 return self .write_array (self .write_float , value , write_length )
171171
172- def write_string_array (self , value : list ):
172+ def write_string_array (self , value : Sequence ):
173173 self .write_array (self .write_aligned_string , value )
174174
175- def write_vector2_array (self , value : list ):
175+ def write_vector2_array (self , value : Sequence ):
176176 self .write_array (self .write_vector2 , value )
177177
178- def write_vector4_array (self , value : list ):
178+ def write_vector4_array (self , value : Sequence ):
179179 self .write_array (self .write_vector4 , value )
180180
181- def write_matrix_array (self , value : list ):
181+ def write_matrix_array (self , value : Sequence ):
182182 self .write_array (self .write_matrix , value )
0 commit comments