@@ -25,7 +25,7 @@ def split(value: str, separator: str = ",", step: int = 1) -> List[str]:
2525def delimited_loads (
2626 explode : bool ,
2727 name : str ,
28- schema_type : str ,
28+ schema_type : str | list [ str ] ,
2929 location : Mapping [str , Any ],
3030 delimiter : str ,
3131) -> Any :
@@ -46,7 +46,10 @@ def delimited_loads(
4646
4747
4848def matrix_loads (
49- explode : bool , name : str , schema_type : str , location : Mapping [str , Any ]
49+ explode : bool ,
50+ name : str ,
51+ schema_type : str | list [str ],
52+ location : Mapping [str , Any ],
5053) -> Any :
5154 if explode == False :
5255 m = re .match (rf"^;{ name } =(.*)$" , location [f";{ name } " ])
@@ -83,7 +86,10 @@ def matrix_loads(
8386
8487
8588def label_loads (
86- explode : bool , name : str , schema_type : str , location : Mapping [str , Any ]
89+ explode : bool ,
90+ name : str ,
91+ schema_type : str | list [str ],
92+ location : Mapping [str , Any ],
8793) -> Any :
8894 if explode == False :
8995 value = location [f".{ name } " ]
@@ -113,7 +119,10 @@ def label_loads(
113119
114120
115121def form_loads (
116- explode : bool , name : str , schema_type : str , location : Mapping [str , Any ]
122+ explode : bool ,
123+ name : str ,
124+ schema_type : str | list [str ],
125+ location : Mapping [str , Any ],
117126) -> Any :
118127 explode_type = (explode , schema_type )
119128 # color=blue,black,brown
@@ -144,7 +153,10 @@ def form_loads(
144153
145154
146155def simple_loads (
147- explode : bool , name : str , schema_type : str , location : Mapping [str , Any ]
156+ explode : bool ,
157+ name : str ,
158+ schema_type : str | list [str ],
159+ location : Mapping [str , Any ],
148160) -> Any :
149161 value = location [name ]
150162
@@ -167,21 +179,30 @@ def simple_loads(
167179
168180
169181def space_delimited_loads (
170- explode : bool , name : str , schema_type : str , location : Mapping [str , Any ]
182+ explode : bool ,
183+ name : str ,
184+ schema_type : str | list [str ],
185+ location : Mapping [str , Any ],
171186) -> Any :
172187 return delimited_loads (
173188 explode , name , schema_type , location , delimiter = "%20"
174189 )
175190
176191
177192def pipe_delimited_loads (
178- explode : bool , name : str , schema_type : str , location : Mapping [str , Any ]
193+ explode : bool ,
194+ name : str ,
195+ schema_type : str | list [str ],
196+ location : Mapping [str , Any ],
179197) -> Any :
180198 return delimited_loads (explode , name , schema_type , location , delimiter = "|" )
181199
182200
183201def deep_object_loads (
184- explode : bool , name : str , schema_type : str , location : Mapping [str , Any ]
202+ explode : bool ,
203+ name : str ,
204+ schema_type : str | list [str ],
205+ location : Mapping [str , Any ],
185206) -> Any :
186207 explode_type = (explode , schema_type )
187208
0 commit comments