@@ -190,10 +190,10 @@ class ListProperty(Property, Generic[InnerProp]):
190
190
191
191
# pylint: disable=unused-argument
192
192
def get_base_type_string (self , * , quoted : bool = False ) -> str :
193
- return f"List[{ self .inner_property .get_type_string (quoted = self .inner_property .is_base_type )} ]"
193
+ return f"List[{ self .inner_property .get_type_string (quoted = not self .inner_property .is_base_type )} ]"
194
194
195
195
def get_base_json_type_string (self , * , quoted : bool = False ) -> str :
196
- return f"List[{ self .inner_property .get_type_string (json = True , quoted = self .inner_property .is_base_type )} ]"
196
+ return f"List[{ self .inner_property .get_type_string (json = True , quoted = not self .inner_property .is_base_type )} ]"
197
197
198
198
def get_instance_type_string (self ) -> str :
199
199
"""Get a string representation of runtime type that should be used for `isinstance` checks"""
@@ -226,7 +226,7 @@ class UnionProperty(Property):
226
226
template : ClassVar [str ] = "union_property.py.jinja"
227
227
228
228
def _get_inner_type_strings (self , json : bool = False ) -> Set [str ]:
229
- return {p .get_type_string (no_optional = True , json = json , quoted = p .is_base_type ) for p in self .inner_properties }
229
+ return {p .get_type_string (no_optional = True , json = json , quoted = not p .is_base_type ) for p in self .inner_properties }
230
230
231
231
@staticmethod
232
232
def _get_type_string_from_inner_type_strings (inner_types : Set [str ]) -> str :
@@ -235,7 +235,7 @@ def _get_type_string_from_inner_type_strings(inner_types: Set[str]) -> str:
235
235
return f"Union[{ ', ' .join (sorted (inner_types ))} ]"
236
236
237
237
# pylint: disable=unused-argument
238
- def get_base_type_string (self , * , quoted : bool = True ) -> str :
238
+ def get_base_type_string (self , * , quoted : bool = False ) -> str :
239
239
return self ._get_type_string_from_inner_type_strings (self ._get_inner_type_strings (json = False ))
240
240
241
241
def get_base_json_type_string (self , * , quoted : bool = False ) -> str :
0 commit comments