I am trying to learn how to use annotations.
I have this class:
class ApiItemPydanticWithTags(ApiItemPydantic):
tags: str
ApiItemPydanticWithTags.__name__ = "ApiWIthTags"
I want to replicate this class creation with type():
ApiItemPydanticWithTags = type("ApiWIthTags", (ApiItemPydantic,), dict(tags: str = None))
But Obviously, dict(tags: str = None) does not work ...
CodePudding user response:
