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've enabled pydantic mypy plugin as I've introduced a class in my project that uses BaseSettings class from pydantic.
Now when I run mypy I get the following error: AsertionError: All arguments mus be fully typed. As all fields are typed (see class in how to reproduced section), I don't understand where this error is coming from.
Traceback
src/shared/infra/settings.py:7: 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.15.0
Traceback (most recent call last):
File "mypy/semanal.py", line 7240, in accept
File "mypy/nodes.py", line 1177, in accept
File "mypy/semanal.py", line 1728, in visit_class_def
File "mypy/semanal.py", line 1944, in analyze_class
File "mypy/semanal.py", line 1991, in analyze_class_body_common
File "mypy/semanal.py", line 2076, in apply_class_plugin_hooks
File "/home/dmartinez/Developer/diego/social-network/.venv/lib/python3.13/site-packages/pydantic/mypy.py", line 159, in _pydantic_model_class_maker_callback
transformer.transform()
~~~~~~~~~~~~~~~~~~~~~^^
File "/home/dmartinez/Developer/diego/social-network/.venv/lib/python3.13/site-packages/pydantic/mypy.py", line 455, in transform
self.add_initializer(fields, config, is_settings, is_root_model)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dmartinez/Developer/diego/social-network/.venv/lib/python3.13/site-packages/pydantic/mypy.py", line 866, in add_initializer
add_method(self._api, self._cls, '__init__', args=args, return_type=NoneType())
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dmartinez/Developer/diego/social-network/.venv/lib/python3.13/site-packages/pydantic/mypy.py", line 1257, in add_method
assert arg.type_annotation, 'All arguments must be fully typed.'
^^^^^^^^^^^^^^^^^^^
AssertionError: All arguments must be fully typed.
src/shared/infra/settings.py:7: : note: use --pdb to drop into pdb
Crash Report
I've enabled pydantic mypy plugin as I've introduced a class in my project that uses
BaseSettings
class from pydantic.Now when I run mypy I get the following error:
AsertionError: All arguments mus be fully typed
. As all fields are typed (see class in how to reproduced section), I don't understand where this error is coming from.Traceback
To Reproduce
In my mypy.ini file I've added the following:
And the class that I created is this one:
Your Environment
mypy.ini
(and other config files):this is my mypy.ini config file
The text was updated successfully, but these errors were encountered: