Skip to content

Commit e8bb1ff

Browse files
authored
Make StrPromise not inherit from Sequence[str] (#1841)
* Make `StrPromise` not inherit from `Sequence[str]` * rm obsolete comment
1 parent 7229151 commit e8bb1ff

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

django-stubs/utils/functional.pyi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import Callable, Sequence
1+
from collections.abc import Callable
22

33
# Mypy has special handling for functools.cached_property, reuse typeshed's definition instead of defining our own
44
from functools import cached_property as cached_property
@@ -20,10 +20,9 @@ class Promise:
2020
def __radd__(self, other: Any) -> Any: ...
2121
def __deepcopy__(self, memo: Any) -> Self: ...
2222

23-
class _StrPromise(Promise, Sequence[str]):
23+
class _StrPromise(Promise):
2424
def __add__(self, __s: str) -> str: ...
25-
# Incompatible with Sequence.__contains__
26-
def __contains__(self, __o: str) -> bool: ... # type: ignore[override]
25+
def __contains__(self, __o: str) -> bool: ...
2726
def __ge__(self, __x: str) -> bool: ...
2827
def __getitem__(self, __i: SupportsIndex | slice) -> str: ...
2928
def __gt__(self, __x: str) -> bool: ...

0 commit comments

Comments
 (0)