-
-
Notifications
You must be signed in to change notification settings - Fork 459
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
Several stub for django.db.models.base.Model
are missing
#204
Comments
@AndreyMZ thanks a lot! Can you please send a PR with the fix? |
I have sent a PR with the stub for But I cannot add stubs for other methods (listed below), because I do not know correct type hints. Methods of
|
I will rename this issue and merge the PR. Later we will return to this. Ok? |
django.db.models.base.Model.unique_error_message
is missingdjango.db.models.base.Model
are missing
Most of the remaining attributes are private (start with an underscore). We only add private attributes when there’s a known real-world use case: https://github.com/typeddjango/django-stubs/blob/master/CONTRIBUTING.md#private-attributes . Many probably never need overriding, such as the The non-private attributes in the list seem to have been added: So I’ll close this issue now - other attributes can be raised in individual issues or straight up PRs. |
Bug report
What's wrong
Steps to reproduce
The following code produces the following warning.
Root cause
No
django.db.models.base.Model.unique_error_message
method in the stub.django-stubs/django-stubs/db/models/base.pyi
Lines 11 to 44 in 8402e7c
How is that should be
django.db.models.base.Model.unique_error_message
and all other methods ofdjango.db.models.base.Model
class must be in the stub:System information
python
version: 3.6.8django
version: 2.2.6mypy
version: -PyCharm
version: 2019.2.3 (Community Edition)django-stubs
version: 1.2.0The text was updated successfully, but these errors were encountered: