Zixuan Li
Zixuan Li
This adds a one-off decorator that discards the return value of the validator before using it for migration operations. See also: https://github.com/typeddjango/django-stubs/pull/1078. Affected errors: ```diff 6c6 < Found 136 errors...
This is a follow-up to #22647 and #22646 (this PR is rebased onto them, only the last 5 commits should be reviewed), which wraps up this series of refactorings to...
This refactors some of the view decorators, particularly `authenticated_json_view` and `authenticated_rest_api_view` to be typed with `ParamSpec`. This is intended to be a follow-up work for #22646 so it is already...
Another series of misc fixes. **Self-review checklist** - [ ] [Self-reviewed](https://zulip.readthedocs.io/en/latest/contributing/code-reviewing.html#how-to-review-code) the changes for clarity and maintainability (variable names, code reuse, readability, etc.). Communicate decisions, questions, and potential concerns. -...
Because our test suites rely on some settings that only present on (or whose types are inferrable from) `zproject.test_extra_settings`, `mypy_django_plugin` might not be able to find out their types. This...
#11560 - [x] Mismatching type signature (`_CodeCallable` uses `BaseDatabaseSchemaEditor` instead of `DatabaseSchemaEditor`) - [x] #22141 - [x] `Cursor.execute` expects a `str` - [x] #22345 - [x] None-check required - [x]...
This discussion for this solution can be found [here](https://chat.zulip.org/#narrow/stream/3-backend/topic/The.20proper.20way.20to.20deal.20with.20.60Promise.60.20objects). `gettext_lazy` returns `Promise` objects that is actually different from `str`. Methods that are present on `str` can also be accessed on...
When we wanted to import `gettext_lazy`, we actually imported to `gettext`. This fixes the typo. **Self-review checklist** - [ ] [Self-reviewed](https://zulip.readthedocs.io/en/latest/contributing/code-reviewing.html#how-to-review-code) the changes for clarity and maintainability (variable names, code...
# 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. ##...