Skip to content

Commit ac91e21

Browse files
committed
Remove extra isinstance
1 parent 85ff686 commit ac91e21

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

openapi_python_client/parser/properties/__init__.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,14 @@ def property_from_data( # noqa: PLR0911, PLR0912
162162
config=config,
163163
roots=roots,
164164
)
165-
if not isinstance(prop, PropertyError):
166-
# We won't be generating a separate Python class for this schema - references to it will just use
167-
# the class for the schema it's referencing - so we don't add it to classes_by_name; but we do
168-
# add it to models_to_process, if it's a model, because its properties still need to be resolved.
169-
if isinstance(prop, ModelProperty):
170-
schemas = evolve(
171-
schemas,
172-
models_to_process=[*schemas.models_to_process, prop],
173-
)
165+
# We won't be generating a separate Python class for this schema - references to it will just use
166+
# the class for the schema it's referencing - so we don't add it to classes_by_name; but we do
167+
# add it to models_to_process, if it's a model, because its properties still need to be resolved.
168+
if isinstance(prop, ModelProperty):
169+
schemas = evolve(
170+
schemas,
171+
models_to_process=[*schemas.models_to_process, prop],
172+
)
174173
return prop, schemas
175174

176175
if data.type == oai.DataType.BOOLEAN:

0 commit comments

Comments
 (0)