django-stubs
django-stubs copied to clipboard
PEP-484 stubs for Django
Can we release the newest main to PyPI? It's possible to install main via a github url directly in pip, but that's somewhat cumbersome and i've had issues specifying the...
Starting with #1038 `user_passes_test` is typed to accept `AbstractBaseUser | AnonymousUser`. While technically correct it would be great if the `mypy` plugin could update this to be the actual model...
# Bug report it seems that accessing foreign key field id with "foreignkey_id" is not understood. Accessing the field with "foreignkey.id" is properly understood but would trigger an extra SQL...
# I have made things! In Django 4.0, `get_response` can no longer be `None` ([4.0 release notes](https://docs.djangoproject.com/en/4.0/releases/4.0/)). This affects `MiddlewareMixin` and its subclasses. ## Related issues
Django uses a proxy method for lazy translation functions that actually returns instances of `Promise` instead of `str`. To be accurate, we should change the signatures for these functions. ##...
Will the new async ORM interface as of Django 4.1 be supported? https://docs.djangoproject.com/en/4.1/releases/4.1/#asynchronous-orm-interface
# Bug report ## What's wrong I cannot find a way to get the typing in `urls.py` right. It seems that a `path` that points to a view returns a...
I have custom user model that inherits from UserProfile from django-tenant-users package. UserProfile has custom model manager. In my model I see an error from mypy: `Mypy: Could not resolve...
GM2MRelation fields from [django-gm2m](https://pypi.org/project/django-gm2m/) do not have `attname` set: ``` error: INTERNAL ERROR -- Please try using mypy master on Github: https://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build Please report a bug at https://github.com/python/mypy/issues version: 0.790...
## What's wrong ```python /home/circleci/.pyenv/versions/3.10.5/lib/python3.10/site-packages/django-stubs/core/validators.pyi:52: note: "EmailValidator" defined here mailchimp/api.py:177: error: Unexpected keyword argument "allowlist" for "EmailValidator" [call-arg] email_validator = EmailValidator(allowlist=[]) ``` ## How is that should be `whitelist` got...