You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
First of all this is an awesome project, I want to use it in all my tools :).
I ran into a small issue: when defining a model that has a field with the same name as one of BaseModel's existing attributes/methods, the field gets parsed but cannot be retrieved:
class BadModel(BaseModel):
schema: str
obj = BaseModel(**{'schema': 'abc'})
print(obj.schema)
This prints <bound method BaseModel.schema of <class 'pydantic.main.BaseModel'>> instead of abc.
This makes perfect sense when looking at the code but is a bit unexpected. To be honest, I'm not sure what the "right" behavior should be here?