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'm trying to start a new project using django-ninja.
I installed mypy, wanted to see how it works with django-ninja... But somehow I can't make it work together. Mypy correctly checks Pydantic models, but it doesn't work with Django-ninja schemas (even though they inherit pydantic.BaseModel).
Here is a little example with pydantic and django-ninja models instantiated incorrectly:
Hi,
I'm trying to start a new project using django-ninja.
I installed mypy, wanted to see how it works with django-ninja... But somehow I can't make it work together. Mypy correctly checks Pydantic models, but it doesn't work with Django-ninja schemas (even though they inherit pydantic.BaseModel).
Here is a little example with pydantic and django-ninja models instantiated incorrectly:
Mypy notices an error when creating P, but doesn't whine about incorrect creation of N:
What am I doing wrong? :|
I'm using:
python 3.12.1
django-ninja 1.1.0
pydantic 2.5.3
mypy 1.8.0
The text was updated successfully, but these errors were encountered: