-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support typing #562
Comments
We should add |
Sure, but first, some questions.
Currently, pyright has better type-checking capabilities, here's example run on this package.
But, if we're planning to only verify that after adding types - we're getting what we expecting - both are good choices. |
Here's basic mypy integration, and it already passes the tests with only two minor changes. |
That’s great, thanks! ⭐
|
Now the hard part! I'll try to add types for fields, my previous idea was working with pyright but i'll need to do some changes for mypy :) What's preferred way of adding types, inline or in separate |
I vote for inline, they provide information when reading the source that way, without having to jump back and forth between the .pyi or relying on IDE support. |
Any update? PR not merged yet. |
Hi, are you interested in adding typing support to your project?
Right now with latest pyright and django-types field in a model behaves like
str
, becouse it's based on CharField.To fix this, i'm using
.pyi
with following content locally:I can make a PR with a changes if you're interested.
The text was updated successfully, but these errors were encountered: