Skip to content

Commit

Permalink
Apply fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eerovil committed Jun 9, 2023
1 parent 83ec9e9 commit ed495dd
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pydantic2ts/cli/script.py
Expand Up @@ -61,14 +61,7 @@ def is_concrete_pydantic_model(obj) -> bool:
Return true if an object is a concrete subclass of pydantic's BaseModel.
'concrete' meaning that it's not a GenericModel.
"""
if not inspect.isclass(obj):
return False
elif obj is BaseModel:
return False
elif GenericModel and issubclass(obj, GenericModel):
return bool(obj.__concrete__)
else:
return issubclass(obj, BaseModel)
return isinstance(obj, ModelMetaclass)


def extract_pydantic_models(module: ModuleType) -> List[Type[BaseModel]]:
Expand Down

0 comments on commit ed495dd

Please sign in to comment.