mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-02-04 00:52:45 +08:00
Improve MultiValueDict/QueryDict dict() return (#899)
According to Django documentation and code, the `MultiValueDict.dict()` method only returns singular values for each key, never a list.
https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.QueryDict.dict
3de787a70b/django/utils/datastructures.py (L215-L217)
This commit is contained in:
@@ -43,7 +43,7 @@ class MultiValueDict(MutableMapping[_K, _V]):
|
||||
def setlistdefault(self, key: _K, default_list: Optional[List[_V]] = ...) -> List[_V]: ...
|
||||
def appendlist(self, key: _K, value: _V) -> None: ...
|
||||
def lists(self) -> Iterable[Tuple[_K, List[_V]]]: ...
|
||||
def dict(self) -> Dict[_K, Union[_V, List[_V]]]: ...
|
||||
def dict(self) -> Dict[_K, _V]: ...
|
||||
def copy(self: _D) -> _D: ...
|
||||
# These overrides are needed to convince mypy that this isn't an abstract class
|
||||
def __delitem__(self, item: _K) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user