fix some code smells

This commit is contained in:
collerek
2021-09-26 14:20:47 +02:00
parent 1da9111dbd
commit ca87e74b2e
2 changed files with 28 additions and 9 deletions

View File

@ -234,10 +234,9 @@ def get_pydantic_example_repr(type_: Any) -> Any:
"""
if issubclass(type_, (numbers.Number, decimal.Decimal)):
return 0
elif issubclass(type_, pydantic.BaseModel):
if issubclass(type_, pydantic.BaseModel):
return generate_pydantic_example(pydantic_model=type_)
else:
return "string"
return "string"
def overwrite_example_and_description(