* Add `is_active` field to `django.contrib.auth.AbstractBaseUser` model
* Favor defining type than setting concrete value
* Update type to reflect sub-class implementation
This also corrects the fact that "run_checks" only returns a concatenated list
of all registered check results, which may only contain CheckMessage:
302caa40e4/django/core/checks/registry.py (L60)
The Django API requires that registered checks take an "app_configs"
argument, which is a list of AppConfig. This is practically also passed by
keyword, so all parameters should be specified with a "= ..." to indicate
that they are keywords.
Django always passed "app_configs" as a list, but checks can accept and
use a more general more Sequence.
The Django API also requires that registered checks take "**kwargs".
This results in the canonical parameters of:
"app_configs: Optional[Sequence[AppConfig]] = ..., **kwargs: Any"
* make BaseModelAdmin generic to properly type the `obj` argument of ModelAdmin.delete_model
closes#482
* turn BaseModelAdmin into bound generic, run black
* add test for generic ModelAdmin
* Allow overridable checks to be CheckMessage
The checks framework expects return types to be "List[CheckMessage]". This
allows all overridable checks-returning methods to return the more general
"CheckMessage", instead of the "Error" subclass.
* Ignore an incorrect usage of the checks API in Django 2.2
These functions were added in Django 2.0, but the stubs have been
incomplete since commit 9a68263257
The implementation is almost identical to `url()` from
`conf/urls/__init__.pyi`
* Allows FileField storage to be a Callable
The `storage` parameter of `FileField` (and by extension `ImageField`)
is not limited to just taking an instance of `Storage`. It can also take
a no-args callable that returns an instance of `Storage`.
* correcting linting issue in forms.pyi
* Output a more clear configuration error
* Performance related improvements in config read handling
* Check python 3.6 with travis
* Revert the .travis.yml py36 inclusion
* Added tests for input error handling
* Thanks isort, isorted it out
* Make exit() function a bit more aesthetic
* Single quote -> double quote docstrings
* Whitespace removed
Sending in a single string leads to unexpected behavior and the method
accepts any iterable, not just sequences, of strings.
Technically sending in a single string is still allowed because a string
is an iterable of strings, but this way the intention of that argument
is clearer.
* additional defer() to offset the effect of using the type before declaring
* linter fix
* linter fix
* linter fix
* test case
Co-authored-by: Kacper Szmigiel <szmigielkacper@gmai.com>
* Don't change type of HttpRequest.user if type has been changed by subclassing
* Asserts for typing
* Add tests
* Add description of HttpRequest subclassing to README
* Dummy to rebuild travis
In addition to the meta properties added
to the Choices enums, value and label are
set for each choice.
This commit explicitly types those instead of the
tuple value and non-extant label types