Skip to content

Commit 19d1b68

Browse files
authored
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 ```
1 parent 9b9de1e commit 19d1b68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/builtins.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ class str(Sequence[str]):
447447
def center(self: LiteralString, __width: SupportsIndex, __fillchar: LiteralString = " ") -> LiteralString: ...
448448
@overload
449449
def center(self, __width: SupportsIndex, __fillchar: str = " ") -> str: ... # type: ignore[misc]
450-
def count(self, x: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
450+
def count(self, __sub: str, __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...) -> int: ...
451451
def encode(self, encoding: str = "utf-8", errors: str = "strict") -> bytes: ...
452452
def endswith(
453453
self, __suffix: str | tuple[str, ...], __start: SupportsIndex | None = ..., __end: SupportsIndex | None = ...

0 commit comments

Comments
 (0)