mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
str.count only takes positional args (#11503)
``` >>> ''.count(x='a') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: str.count() takes no keyword arguments ```
This commit is contained in:
@@ -447,7 +447,7 @@ class str(Sequence[str]):
|
||||
def center(self: LiteralString, __width: SupportsIndex, __fillchar: LiteralString = " ") -> LiteralString: ...
|
||||
@overload
|
||||
def center(self, __width: SupportsIndex, __fillchar: str = " ") -> str: ... # type: ignore[misc]
|
||||
def count(self, x: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
|
||||
def count(self, __sub: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
|
||||
def encode(self, encoding: str = "utf-8", errors: str = "strict") -> bytes: ...
|
||||
def endswith(
|
||||
self, __suffix: str | tuple[str, ...], __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...
|
||||
|
||||
Reference in New Issue
Block a user