Skip to content

Commit 30f69bc

Browse files
Lint
1 parent 48b9de9 commit 30f69bc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

openapi_python_client/parser/properties/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ def _property_from_data(
410410
for attribute in ["allOf", "anyOf", "oneOf"]:
411411
sub_data = getattr(data, attribute)
412412
if sub_data and len(sub_data) == 1 and isinstance(sub_data[0], oai.Reference):
413-
return _property_from_ref(name=name, required=required, nullable=data.nullable, data=sub_data[0], schemas=schemas)
413+
return _property_from_ref(
414+
name=name, required=required, nullable=data.nullable, data=sub_data[0], schemas=schemas
415+
)
414416

415417
if data.enum:
416418
return build_enum_property(

tests/test_parser/test_properties/test_init.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,9 @@ def test_property_from_data_union_of_one_element(self, mocker):
820820
build_union_property = mocker.patch(f"{MODULE_NAME}.build_union_property")
821821
mocker.patch("openapi_python_client.utils.remove_string_escapes", return_value=name)
822822

823-
prop, schemas = property_from_data(name=name, required=required, data=data, schemas=schemas, parent_name="parent")
823+
prop, schemas = property_from_data(
824+
name=name, required=required, data=data, schemas=schemas, parent_name="parent"
825+
)
824826

825827
assert prop == ModelProperty(
826828
name=name,

0 commit comments

Comments
 (0)