-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Error when setting gettext_lazy
as class attribute
#1231
Labels
bug
Something isn't working
Comments
CC @PIG208 |
@browniebroke thank you for the report! I think that one issue is fine. This was pretty big change, I hope we can find and fix corner cases in a patch release soon. |
PIG208
added a commit
to PIG208/django-stubs
that referenced
this issue
Nov 6, 2022
Fixes typeddjango#1231 Signed-off-by: Zixuan James Li <[email protected]>
PIG208
added a commit
to PIG208/django-stubs
that referenced
this issue
Nov 6, 2022
Fixes typeddjango#1231 Signed-off-by: Zixuan James Li <[email protected]>
sobolevn
pushed a commit
that referenced
this issue
Nov 6, 2022
* Replace str with _StrOrPromise where the latter is expected. Fixes #1231 Signed-off-by: Zixuan James Li <[email protected]> * Support lazy strings for _FieldsetSpec. Signed-off-by: Zixuan James Li <[email protected]> Signed-off-by: Zixuan James Li <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
What's wrong
We received an update in cookiecutter-django to update to the latest django-stubs, but the type checks fail:
https://github.com/cookiecutter/cookiecutter-django/actions/runs/3385553002/jobs/5623835120#step:5:2492
The reason is because the
success_message
attribute forSuccessMessageMixin
should accept lazy string.django-stubs/django-stubs/contrib/messages/views.pyi
Lines 6 to 9 in 8f97bf8
References:
I assume there are a other mixin with the same problem.
Related error:
Note that the CI run above also have a similar error regarding the model admin
fieldsets
attribute (defined here) - I'm happy to open a separate issue about it, but maybe we should consider a overall fix?How is that should be
The type annotation for success_message should accept lazy strings too:
System information
python
version: 3.10django
version: 4.0mypy
version: 0.982django-stubs
version: 1.13.0django-stubs-ext
version: n/a (I don't think this package is installed?)The text was updated successfully, but these errors were encountered: