Skip to content

Commit

Permalink
poetry in
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-bl committed Jan 7, 2025
1 parent bcfd0d2 commit 91f72f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openapi_python_client/parser/properties/union.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ def process_items(
not isinstance(sub_properties, PropertyError)
and len([p for p in sub_properties if isinstance(p, HasNamedClass)]) == 1
):
already_processed_props = sub_properties

def _use_same_name_as_parent_for_that_one_variant(index: int) -> str:
for i, p in enumerate(sub_properties):
for i, p in enumerate(already_processed_props):
if i == index and isinstance(p, HasNamedClass):
return name
return _add_index_suffix_to_variant_names(index)
Expand Down

0 comments on commit 91f72f0

Please sign in to comment.