diff --git a/django-stubs/utils/functional.pyi b/django-stubs/utils/functional.pyi index ff667254e..c1c2db553 100644 --- a/django-stubs/utils/functional.pyi +++ b/django-stubs/utils/functional.pyi @@ -1,4 +1,4 @@ -from collections.abc import Callable, Sequence +from collections.abc import Callable # Mypy has special handling for functools.cached_property, reuse typeshed's definition instead of defining our own from functools import cached_property as cached_property @@ -20,10 +20,9 @@ class Promise: def __radd__(self, other: Any) -> Any: ... def __deepcopy__(self, memo: Any) -> Self: ... -class _StrPromise(Promise, Sequence[str]): +class _StrPromise(Promise): def __add__(self, __s: str) -> str: ... - # Incompatible with Sequence.__contains__ - def __contains__(self, __o: str) -> bool: ... # type: ignore[override] + def __contains__(self, __o: str) -> bool: ... def __ge__(self, __x: str) -> bool: ... def __getitem__(self, __i: SupportsIndex | slice) -> str: ... def __gt__(self, __x: str) -> bool: ...