django-stubs
django-stubs copied to clipboard
PEP-484 stubs for Django
# I have made things! ## Related issues
# Bug report ## What's wrong Using `RawQuerySet` as type annotation is not possible. _Without_ the generic parameter, mypy fails with `is not subscriptable` error. _With_ the generic parameter, python...
# I have made things! Ref the docs: https://docs.djangoproject.com/en/5.0/topics/http/urls/#how-django-processes-a-request > Django determines the root URLconf module to use. Ordinarily, this is the value of the ROOT_URLCONF setting, but if the...
# Bug report so I realize this is not the best of reports -- all attempts I've made to make a minimal case do not reproduce the bug so I...
There are quite a bit of changes in here, but it shouldn't produce any different results really. It mainly allows `pyright` to also pick up types from the builtin models....
# Bug report ## What's wrong Looks like presence `django-stubs` package breaks PyCharm tag resolving mechanism for Django templates.  Literally, all Django template tags (built-in or custom) become unresolved...
## What's wrong The return type of as_sql(), set as `_AsSqlType`, results to `tuple[str, list[str | int]]` ## How is that should be It should be `tuple[str, tuple[Any, ...]]` ##...
# Bug report `django.contrib.auth.models.User.email` allows assignment of an integer. It's not just a problem for the `User` model but for all instances of `EmailField`. ## What's wrong ```python from django.contrib.auth.models...