From cdbf0265ee1603417f1e3b261ed9510e2bf534d6 Mon Sep 17 00:00:00 2001 From: Collin Anderson Date: Wed, 30 Apr 2025 15:09:34 -0400 Subject: [PATCH] QueryDict / MultiValueDict __getitem__ always returns _V type (not empty list) --- django-stubs/utils/datastructures.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-stubs/utils/datastructures.pyi b/django-stubs/utils/datastructures.pyi index 17dca2fe9..645aa522c 100644 --- a/django-stubs/utils/datastructures.pyi +++ b/django-stubs/utils/datastructures.pyi @@ -53,7 +53,7 @@ class MultiValueDict(MutableMapping[_K, _V]): def copy(self) -> Self: ... # These overrides are needed to convince mypy that this isn't an abstract class def __delitem__(self, item: _K) -> None: ... - def __getitem__(self, item: _K) -> _V | Literal[[]]: ... # type: ignore + def __getitem__(self, item: _K) -> _V: ... def __setitem__(self, k: _K, v: _V | list[_V]) -> None: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_K]: ...