-
Notifications
You must be signed in to change notification settings - Fork 764
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
Obsolete bundled django-stubs #4562
Comments
The Django stubs that are bundled with Pylance come from https://github.com/sbdchd/django-types not from https://github.com/typeddjango/django-stubs, which I assume is what you mean by the "official" stubs. Even those are community maintained btw. The problem with django-stubs is that many of its annotations assume that you are using mypy plus the django-stubs mypy plug-in, and therefore there are issues with the stubs when using other type checkers. I can't say why django-types is lagging so far behind django-stubs. It's not dead. They are still merging several PRs per month. There's an open issue suggesting that django-stubs adopt the approach used in django-types so it could work across type checkers. The issue was originally opened 2+ years ago though. If you, or anyone reading this, are motivated to make this change I'm sure you'd make a lot of people happy. In the meantime, you could try using django-stubs to see if it works better for your personal needs. I don't recall what particular problems caused us to switch to django-types, but maybe your particular codebase won't hit those problems. One approach would be to put django-stubs in your |
Hi @debonte and thanks for the fast reply! I was aware that those two existed but never thought that I'm afraid I'm not enough in type checking to dare contribute to such a work but I just created a small PR to add the missing parameter I've found inside Thanks again for your reply and hope your answer can help others know what is used inside |
Hello,
I was wondering how and when bundled
django-stubs
were updated as I'm using quite a recent version ofpylance
but came across an incorrect type definition that was corrected in the officialdjango-stubs
repo... in 2021 !Here's a snapshot where you can see the version used and the problematic type definition (the second definition of
atomic
):And here's a snapshot where you can see the history of this file and that a
durable
argument was added toatomic
on Apr 13, 2021This wasn't removed inbetween and is still present today in the official
django-stubs
. Can you help me better understand howpylance
team manages inclusion of those stubs or best-practices to keep them up-to-date?Many thanks in advance,
Sébastien
The text was updated successfully, but these errors were encountered: