@@ -163,9 +163,7 @@ def _collect_unique_imports(conversions: List[TypeConversion]) -> Optional[List[
163163 return imports if imports else None
164164
165165
166- def _convert_primitive_type (
167- type_str : Optional [str ], required : bool
168- ) -> TypeConversion :
166+ def _convert_primitive_type (type_str : Optional [str ], required : bool ) -> TypeConversion :
169167 """
170168 Handle simple primitive type conversion (string, int, float, bool, object, null, Any).
171169
@@ -225,7 +223,9 @@ def _convert_array_type(
225223 )
226224 import_types = converted_reference .type .import_types
227225 original_type = "array<" + converted_reference .type .original_type + ">"
228- converted_type = list_prefix + converted_reference .type .converted_type + list_suffix
226+ converted_type = (
227+ list_prefix + converted_reference .type .converted_type + list_suffix
228+ )
229229 elif isinstance (schema .items , Schema30 ) or isinstance (schema .items , Schema31 ):
230230 # For schema items, always pass True (items are always required within the array)
231231 item_type_str = _normalize_schema_type (schema .items )
@@ -288,17 +288,23 @@ def _convert_composite_schema(
288288
289289 # Build original type string
290290 if kind == "allOf" :
291- original_type = "tuple<" + "," .join ([c .original_type for c in conversions ]) + ">"
291+ original_type = (
292+ "tuple<" + "," .join ([c .original_type for c in conversions ]) + ">"
293+ )
292294 type_wrapper = "Tuple"
293295 else : # oneOf or anyOf
294- original_type = "union<" + "," .join ([c .original_type for c in conversions ]) + ">"
296+ original_type = (
297+ "union<" + "," .join ([c .original_type for c in conversions ]) + ">"
298+ )
295299 type_wrapper = "Union"
296300
297301 # Build converted type string
298302 if len (conversions ) == 1 :
299303 converted_type = conversions [0 ].converted_type
300304 else :
301- converted_type = type_wrapper + "[" + "," .join ([c .converted_type for c in conversions ]) + "]"
305+ converted_type = (
306+ type_wrapper + "[" + "," .join ([c .converted_type for c in conversions ]) + "]"
307+ )
302308
303309 converted_type = _wrap_optional (converted_type , required )
304310 import_types = _collect_unique_imports (conversions )
0 commit comments