Closed as not planned
Description
Crash Report
Updated mypy to 1.11.1 version. Run mypy and faced with error.
It doesn't crash with mypy 1.10.1
Traceback
❯ mypy xxx/ --show-traceback
/home/omerfi/xxx/.venv/lib/python3.10/site-packages/pydantic/env_settings.py:23: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
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: 1.11.1
Traceback (most recent call last):
File "mypy/semanal.py", line 7092, in accept
File "mypy/nodes.py", line 1183, in accept
File "mypy/semanal.py", line 1700, in visit_class_def
File "mypy/semanal.py", line 1891, in analyze_class
File "mypy/semanal.py", line 1925, in analyze_class_body_common
File "mypy/semanal.py", line 2010, in apply_class_plugin_hooks
File "pydantic/mypy.py", line 154, in pydantic.mypy.PydanticPlugin._pydantic_model_class_maker_callback
File "pydantic/mypy.py", line 317, in pydantic.mypy.PydanticModelTransformer.transform
File "pydantic/mypy.py", line 497, in pydantic.mypy.PydanticModelTransformer.add_construct_method
File "mypy/types.py", line 607, in __init__
TypeError: mypy.types.TypeVarId object expected; got int
/home/omerfi/xxx/.venv/lib/python3.10/site-packages/pydantic/env_settings.py:23: : note: use --pdb to drop into pdb
To Reproduce
I created a POC repository. You can follow the instructions in the README and face the error yourself: https://github.com/OmerFI/mypyfailproject
Your Environment
- Mypy version used: 1.11.1
- Mypy command-line flags: -
- Mypy configuration options from
mypy.ini
(and other config files): https://github.com/OmerFI/mypyfailproject/blob/main/mypy.ini - Python version used: 3.10.13
- Operating system and version: Ubuntu 22.04.2 LTS (WSL)