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
I have searched (google, github) for similar issues and couldn't find anything
I have read and followed the docs and still think this is a bug
Bug
When using the latest alpha release with mypy==0.930 I get the following error:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.930
Traceback (most recent call last):
File "mypy/semanal.py", line 5132, in accept
File "mypy/nodes.py", line 1005, in accept
File "mypy/semanal.py", line 1105, in visit_class_def
File "mypy/semanal.py", line 1184, in analyze_class
File "mypy/semanal.py", line 1193, in analyze_class_body_common
File "mypy/semanal.py", line 1253, in apply_class_plugin_hooks
File "pydantic/mypy.py", line 114, in pydantic.mypy.PydanticPlugin._pydantic_model_class_maker_callback
File "pydantic/mypy.py", line 200, in pydantic.mypy.PydanticModelTransformer.transform
File "pydantic/mypy.py", line 341, in pydantic.mypy.PydanticModelTransformer.add_initializer
File "pydantic/mypy.py", line 657, in pydantic.mypy.add_method
File "mypy/semanal.py", line 4538, in named_type
File "mypy/semanal.py", line 4505, in lookup_fully_qualified
AssertionError:
/Users/paul/.cache/pre-commit/repo4nch0291/py_env-python3.9/lib/python3.9/site-packages/pydantic/env_settings.py:21: : note: use --pdb to drop into pdb
The behavior of named_type changed in python/mypy#11332 which causes the issue. Calls to named_type in the plugin should use builtins.X instead of __builtins__.X for the fullname arg.
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
Checks
Bug
When using the latest alpha release with
mypy==0.930
I get the following error:The behavior of
named_type
changed in python/mypy#11332 which causes the issue. Calls tonamed_type
in the plugin should usebuiltins.X
instead of__builtins__.X
for thefullname
arg.Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:The text was updated successfully, but these errors were encountered: