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
The third may be the most debatable. I find extras=ignore a bit dangerous, since typos are not caught if the fields have default values. This is especially dangerous if we load class arguments from a dict, such as from the yml config file. In some classes, we add attributes later on, so we are setting extras=allow there, which would create a conflict. Happy to discuss this.
The text was updated successfully, but these errors were encountered:
Instead of classes inheriting from pydantic BaseClass, we could make a SodymPydanticModel class, with a default config such as
extras=ignore
a bit dangerous, since typos are not caught if the fields have default values. This is especially dangerous if we load class arguments from a dict, such as from the yml config file. In some classes, we add attributes later on, so we are settingextras=allow
there, which would create a conflict. Happy to discuss this.The text was updated successfully, but these errors were encountered: