Store model config in model attribute

This commit is contained in:
Morten Engen
2023-07-07 13:04:46 +02:00
parent 03cd989165
commit 473e5cfddb
@@ -7,6 +7,7 @@ from pydantic.config import Extra
class AbstractTransport(ABC, BaseModel):
_name: str = "Abstract"
model_config = {'extra': 'allow', 'arbitrary_types_allowed': True}
@property
def name(self):
@@ -87,7 +88,3 @@ class AbstractTransport(ABC, BaseModel):
str -- the string representation of the root object
"""
pass
class Config:
extra = Extra.allow
arbitrary_types_allowed = True