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
When running mypy on my application code using Poetry (version 1.3.2) I get INTERNAL ERROR every time. To run mypy, I use the following command: poetry run mypy app, where app is the folder containing my application code.
Traceback
/Users/kamil.wozniak/code/halina/.venv/lib/python3.11/site-packages/pydantic/env_settings.py:22: 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.4.0
Traceback (most recent call last):
File "mypy/semanal.py", line 6451, in accept
File "mypy/nodes.py", line 1139, in accept
File "mypy/semanal.py", line 1582, in visit_class_def
File "mypy/semanal.py", line 1667, in analyze_class
File "mypy/semanal.py", line 1694, in analyze_class_body_common
File "mypy/semanal.py", line 1777, 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 321, in pydantic.mypy.PydanticModelTransformer.transform
File "pydantic/mypy.py", line 500, in pydantic.mypy.PydanticModelTransformer.add_construct_method
TypeError: __init__() missing required argument 'default' (pos 6)
/Users/kamil.wozniak/code/halina/.venv/lib/python3.11/site-packages/pydantic/env_settings.py:22: : note: use --pdb to drop into pdb
To Reproduce
I'm using Poetry (version 1.3.2) and mypy version (1.4). Moreover I'm using mypy's plugin for pydantic defined in pyproject.toml:
The pydantic version I'm using is 1.10.7. To run mypy, I use the following command: poetry run mypy app, where app is the folder containing my application code.
Please note, that all works fine for mypy version 1.3 without any errors.
Your Environment
Mypy version used: 1.4
Mypy command-line flags:
Mypy configuration options from mypy.ini (and other config files):
Crash Report
When running
mypy
on my application code using Poetry (version 1.3.2) I get INTERNAL ERROR every time. To run mypy, I use the following command:poetry run mypy app
, whereapp
is the folder containing my application code.Traceback
To Reproduce
I'm using Poetry (version 1.3.2) and mypy version (1.4). Moreover I'm using mypy's plugin for pydantic defined in pyproject.toml:
The pydantic version I'm using is 1.10.7. To run mypy, I use the following command:
poetry run mypy app
, whereapp
is the folder containing my application code.Please note, that all works fine for mypy version 1.3 without any errors.
Your Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: