@@ -106,10 +106,9 @@ def convert_value(self, value: Any) -> Value | None | PropertyError:
106106 return value_or_error
107107 return value_or_error
108108
109- def _get_inner_type_strings (self , json : bool , multipart : bool ) -> set [str ]:
109+ def _get_inner_type_strings (self , json : bool ) -> set [str ]:
110110 return {
111- p .get_type_string (no_optional = True , json = json , multipart = multipart , quoted = not p .is_base_type )
112- for p in self .inner_properties
111+ p .get_type_string (no_optional = True , json = json , quoted = not p .is_base_type ) for p in self .inner_properties
113112 }
114113
115114 @staticmethod
@@ -119,12 +118,12 @@ def _get_type_string_from_inner_type_strings(inner_types: set[str]) -> str:
119118 return f"Union[{ ', ' .join (sorted (inner_types ))} ]"
120119
121120 def get_base_type_string (self , * , quoted : bool = False ) -> str :
122- return self ._get_type_string_from_inner_type_strings (self ._get_inner_type_strings (json = False , multipart = False ))
121+ return self ._get_type_string_from_inner_type_strings (self ._get_inner_type_strings (json = False ))
123122
124123 def get_base_json_type_string (self , * , quoted : bool = False ) -> str :
125- return self ._get_type_string_from_inner_type_strings (self ._get_inner_type_strings (json = True , multipart = False ))
124+ return self ._get_type_string_from_inner_type_strings (self ._get_inner_type_strings (json = True ))
126125
127- def get_type_strings_in_union (self , * , no_optional : bool = False , json : bool , multipart : bool ) -> set [str ]:
126+ def get_type_strings_in_union (self , * , no_optional : bool = False , json : bool ) -> set [str ]:
128127 """
129128 Get the set of all the types that should appear within the `Union` representing this property.
130129
@@ -133,12 +132,11 @@ def get_type_strings_in_union(self, *, no_optional: bool = False, json: bool, mu
133132 Args:
134133 no_optional: Do not include `None` or `Unset` in this set.
135134 json: If True, this returns the JSON types, not the Python types, of this property.
136- multipart: If True, this returns the multipart types, not the Python types, of this property.
137135
138136 Returns:
139137 A set of strings containing the types that should appear within `Union`.
140138 """
141- type_strings = self ._get_inner_type_strings (json = json , multipart = multipart )
139+ type_strings = self ._get_inner_type_strings (json = json )
142140 if no_optional :
143141 return type_strings
144142 if not self .required :
@@ -150,15 +148,14 @@ def get_type_string(
150148 no_optional : bool = False ,
151149 json : bool = False ,
152150 * ,
153- multipart : bool = False ,
154151 quoted : bool = False ,
155152 ) -> str :
156153 """
157154 Get a string representation of type that should be used when declaring this property.
158155 This implementation differs slightly from `Property.get_type_string` in order to collapse
159156 nested union types.
160157 """
161- type_strings_in_union = self .get_type_strings_in_union (no_optional = no_optional , json = json , multipart = multipart )
158+ type_strings_in_union = self .get_type_strings_in_union (no_optional = no_optional , json = json )
162159 return self ._get_type_string_from_inner_type_strings (type_strings_in_union )
163160
164161 def get_imports (self , * , prefix : str ) -> set [str ]:
0 commit comments