Skip to content

Commit fbcfd65

Browse files
committed
update docstring for get_base_*type_string
1 parent 986f152 commit fbcfd65

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

openapi_python_client/parser/properties/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ class UnionProperty(Property):
226226
template: ClassVar[str] = "union_property.py.jinja"
227227

228228
def _get_inner_type_strings(self, json: bool = False) -> Set[str]:
229-
return {p.get_type_string(no_optional=True, json=json, quoted=not p.is_base_type) for p in self.inner_properties}
229+
return {
230+
p.get_type_string(no_optional=True, json=json, quoted=not p.is_base_type) for p in self.inner_properties
231+
}
230232

231233
@staticmethod
232234
def _get_type_string_from_inner_type_strings(inner_types: Set[str]) -> str:

openapi_python_client/parser/properties/property.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def set_python_name(self, new_name: str, config: Config) -> None:
6666
object.__setattr__(self, "python_name", PythonIdentifier(value=new_name, prefix=config.field_prefix))
6767

6868
def get_base_type_string(self, *, quoted: bool = False) -> str:
69-
"""Get the string describing the Python type of this property."""
69+
"""Get the string describing the Python type of this property. Base types no require quoting."""
7070
return f'"{self._type_string}"' if not self.is_base_type and quoted else self._type_string
7171

7272
def get_base_json_type_string(self, *, quoted: bool = False) -> str:
73-
"""Get the string describing the JSON type of this property."""
73+
"""Get the string describing the JSON type of this property. Base types no require quoting."""
7474
return f'"{self._json_type_string}"' if not self.is_base_type and quoted else self._json_type_string
7575

7676
def get_type_string(

0 commit comments

Comments
 (0)