mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 16:27:09 +08:00
* Allow Collection for 'fields' and 'exclude' of form model helpers (#637) There are several functions and classes in `django.forms.models` that take a `fields` or `exclude` argument. Previously, `Sequence` was used to annotate these, but the code of Django (I checked version 3.2.4) doesn't require `__getitem__()` to be implemented, so requiring `Collection` instead is sufficient. The practical advantage of requiring `Collection` is that a set, such as the key set of a dictionary, can be passed without first having to convert it to a list or tuple. * Pin mypy to below version 0.900 * Remove Callable for 'fields' and 'exclude' of form model helpers I cannot find any support for callables for these two arguments in the code or in the documentation. * Update setup.py Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
committed by
GitHub
parent
77f9926ce1
commit
8c387e85fe