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
Untyped overridden fields are forbidden and an error is thrown on execution and in mypy. However, untyped ClassVar are allowed in a BaseModel, but it seems that this case is not properly handeled by the mypy plugin here .
The example code below run fine, but a mypy error error: Untyped fields disallowed is thrown.
Thanks for reporting this. This does look like a bug. Looks like you may have found the source of the problem. Are you interested in contributing a PR with a fix?
Initial Checks
Description
Untyped overridden fields are forbidden and an error is thrown on execution and in mypy. However, untyped ClassVar are allowed in a BaseModel, but it seems that this case is not properly handeled by the mypy plugin here .
The example code below run fine, but a mypy error
error: Untyped fields disallowed
is thrown.Example Code
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: