Skip to content

Commit dde2faf

Browse files
Tweaks
1 parent dfc60f2 commit dde2faf

File tree

1 file changed

+59
-59
lines changed

1 file changed

+59
-59
lines changed

lang/en/typeshed/stdlib/builtins.pyi

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Use builtin classes and functions
1+
"""Built-in classes and functions
22
"""
33

44
import sys
@@ -392,55 +392,55 @@ class str(Sequence[str]):
392392
def count(
393393
self,
394394
x: str,
395-
__start: SupportsIndex | None = ...,
396-
__end: SupportsIndex | None = ...,
395+
start: SupportsIndex | None = ...,
396+
end: SupportsIndex | None = ...,
397397
) -> int:
398398
"""Get the number of non-overlapping occurences of a substring in the string.
399399
400-
The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to count.
400+
The optional ``start`` and ``end`` arguments can be used to specify a substring in which to count.
401401
402402
Example: ``count = "banana".count("na")``
403403
404404
:param x: The substring to count.
405-
:param __start: Optional argument to specify the start of the substring in which to count.
406-
:param __end: Optional argument to specify the end of the substring in which to count.
405+
:param start: Optional argument to specify the start of the substring in which to count.
406+
:param end: Optional argument to specify the end of the substring in which to count.
407407
:return: The number of non-overlapping occurences of a substring in the string as an ``int``.
408408
"""
409409
...
410410
def encode(self, encoding: str = ..., errors: str = ...) -> bytes: ...
411411
def endswith(
412412
self,
413-
__suffix: str | Tuple[str, ...],
414-
__start: SupportsIndex | None = ...,
415-
__end: SupportsIndex | None = ...,
413+
suffix: str | Tuple[str, ...],
414+
start: SupportsIndex | None = ...,
415+
end: SupportsIndex | None = ...,
416416
) -> bool:
417417
"""Check if the string ends with a substring.
418418
419-
The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.
419+
The optional ``start`` and ``end`` arguments can be used to specify the range to test.
420420
421421
Example: ``ends_with_hello = "hello, world".endswith("hello")``
422422
423-
:param __prefix: The prefix to check for.
424-
:param __start: Optional argument to specify the start of the substring to test.
425-
:param __end: Optional argument to specify the end of the substring to test.
423+
:param prefix: The prefix to check for.
424+
:param start: Optional argument to specify the start of the substring to test.
425+
:param end: Optional argument to specify the end of the substring to test.
426426
:return: ``True`` if the string ends with the substring, otherwise ``False``.
427427
"""
428428
...
429429
def find(
430430
self,
431-
__sub: str,
432-
__start: SupportsIndex | None = ...,
433-
__end: SupportsIndex | None = ...,
431+
sub: str,
432+
start: SupportsIndex | None = ...,
433+
end: SupportsIndex | None = ...,
434434
) -> int:
435435
"""Get the lowest index of where the substring is found.
436436
437-
The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.
437+
The optional ``start`` and ``end`` arguments can be used to specify a substring in which to search.
438438
439439
Example: ``index = "banana".find("na")``
440440
441-
:param __sub: The substring to find.
442-
:param __start: Optional argument to specify the start of the substring in which to search.
443-
:param __end: Optional argument to specify the end of the substring in which to search.
441+
:param sub: The substring to find.
442+
:param start: Optional argument to specify the start of the substring in which to search.
443+
:param end: Optional argument to specify the end of the substring in which to search.
444444
:return: The the lowest index of where the substring is found, -1 if not found.
445445
"""
446446
...
@@ -509,32 +509,32 @@ class str(Sequence[str]):
509509
:return: A copy of the string with the leading characters removed.
510510
"""
511511
...
512-
def replace(self, __old: str, __new: str, __count: SupportsIndex = ...) -> str:
512+
def replace(self, old: str, new: str, count: SupportsIndex = ...) -> str:
513513
"""Get a copy of the string with all occurrences of the old substring replaced by new.
514514
515515
Example: ``replaced = "apple, orange".replace("orange", "banana")``
516516
517-
:param __old: The substring to replace.
518-
:param __new: The replacement substring.
519-
:param __count: Optional argument to specify the number of occurences of the old substring that should be replaced.
517+
:param old: The substring to replace.
518+
:param new: The replacement substring.
519+
:param count: Optional argument to specify the number of occurences of the old substring that should be replaced.
520520
:return: A copy of the string with all occurrences of the old substring replaced by new.
521521
"""
522522
...
523523
def rfind(
524524
self,
525-
__sub: str,
526-
__start: SupportsIndex | None = ...,
527-
__end: SupportsIndex | None = ...,
525+
sub: str,
526+
start: SupportsIndex | None = ...,
527+
end: SupportsIndex | None = ...,
528528
) -> int:
529529
"""Get the highest index of where the substring is found.
530530
531-
The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.
531+
The optional ``start`` and ``end`` arguments can be used to specify a substring in which to search.
532532
533533
Example: ``index = "banana".rfind("na")``
534534
535-
:param __sub: The substring to find.
536-
:param __start: Optional argument to specify the start of the substring in which to search.
537-
:param __end: Optional argument to specify the end of the substring in which to search.
535+
:param sub: The substring to find.
536+
:param start: Optional argument to specify the start of the substring in which to search.
537+
:param end: Optional argument to specify the end of the substring in which to search.
538538
:return: The the highest index of where the substring is found, -1 if not found.
539539
"""
540540
...
@@ -561,28 +561,28 @@ class str(Sequence[str]):
561561
) -> list[str]: ...
562562
def startswith(
563563
self,
564-
__prefix: str | Tuple[str, ...],
565-
__start: SupportsIndex | None = ...,
566-
__end: SupportsIndex | None = ...,
564+
prefix: str | Tuple[str, ...],
565+
start: SupportsIndex | None = ...,
566+
end: SupportsIndex | None = ...,
567567
) -> bool:
568568
"""Check if the string starts with a substring.
569569
570-
The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.
570+
The optional ``start`` and ``end`` arguments can be used to specify the range to test.
571571
572572
Example: ``starts_with_hello = "hello, world".startswith("hello")``
573573
574-
:param __prefix: The prefix to check for.
575-
:param __start: Optional argument to specify the start of the substring to test.
576-
:param __end: Optional argument to specify the end of the substring to test.
574+
:param prefix: The prefix to check for.
575+
:param start: Optional argument to specify the start of the substring to test.
576+
:param end: Optional argument to specify the end of the substring to test.
577577
:return: ``True`` if the string starts with the substring, otherwise ``False``.
578578
"""
579579
...
580-
def strip(self, __chars: str | None = ...) -> str:
580+
def strip(self, chars: str | None = ...) -> str:
581581
"""Get a copy of the string with the leading and trailing characters removed.
582582
583583
Example: ``stripped = " hello ".strip()``
584584
585-
:param __chars: (default=" ") The characters to be removed. Defaults to whitespace characters if not provided.
585+
:param chars: (default=" ") The characters to be removed. Defaults to whitespace characters if not provided.
586586
:return: A copy of the string with the leading and trailing characters removed.
587587
"""
588588
...
@@ -875,16 +875,16 @@ class list(MutableSequence[_T], Generic[_T]):
875875
"""
876876
...
877877
def copy(self) -> list[_T]: ...
878-
def append(self, __object: _T) -> None:
878+
def append(self, object: _T) -> None:
879879
"""Add an item to the end of the list.
880880
881881
Example: ``[1, 2, 3].append(4)``
882882
883-
:param __object: An item to add the end of the list.
883+
:param object: An item to add the end of the list.
884884
"""
885885
...
886886
def extend(self, __iterable: Iterable[_T]) -> None: ...
887-
def pop(self, __index: SupportsIndex = ...) -> _T:
887+
def pop(self, index: SupportsIndex = ...) -> _T:
888888
"""Remove and return an item from the list.
889889
890890
If no ``index`` is provided, the last item in the list is removed.
@@ -897,34 +897,34 @@ class list(MutableSequence[_T], Generic[_T]):
897897
"""
898898
...
899899
def index(
900-
self, __value: _T, __start: SupportsIndex = ..., __stop: SupportsIndex = ...
900+
self, value: _T, start: SupportsIndex = ..., stop: SupportsIndex = ...
901901
) -> int: ...
902-
def count(self, __value: _T) -> int:
902+
def count(self, value: _T) -> int:
903903
"""Get the number of times an item appears in the list.
904904
905905
Example: ``["a", "b", "a"].count("a")``
906906
907-
:param __value: The item to count.
907+
:param value: The item to count.
908908
:return: The number of times an item appears in the list.
909909
"""
910910
...
911-
def insert(self, __index: SupportsIndex, __object: _T) -> None:
911+
def insert(self, index: SupportsIndex, object: _T) -> None:
912912
"""Insert an item into the list at a given position.
913913
914914
Example: ``["a", "b", "a"].insert(2, "c")``
915915
916-
:param __index: The position at which to insert the item.
917-
:param __object: The item to insert.
916+
:param index: The position at which to insert the item.
917+
:param object: The item to insert.
918918
"""
919919
...
920-
def remove(self, __value: _T) -> None:
920+
def remove(self, value: _T) -> None:
921921
"""Remove the first occurence of a value from the list.
922922
923923
A ``ValueError`` is raised if the ``value`` does not appear in the list.
924924
925925
Example: ``["a", "b", "a"].remove("a")``
926926
927-
:param __value: The item to remove.
927+
:param value: The item to remove.
928928
"""
929929
...
930930
def reverse(self) -> None:
@@ -1143,12 +1143,12 @@ class _NotImplementedType(Any): # type: ignore
11431143

11441144
NotImplemented: _NotImplementedType
11451145

1146-
def abs(__x: SupportsAbs[_T]) -> _T:
1146+
def abs(x: SupportsAbs[_T]) -> _T:
11471147
"""Get the absolute value of a number.
11481148
11491149
Example: ``abs(-42)``
11501150
1151-
:param __x: A number.
1151+
:param x: A number.
11521152
:return: The length of or number of items in an object.
11531153
"""
11541154
...
@@ -1160,12 +1160,12 @@ if sys.version_info >= (3, 7):
11601160
def breakpoint(*args: Any, **kws: Any) -> None: ...
11611161

11621162
def callable(__obj: object) -> bool: ...
1163-
def chr(__i: int) -> str:
1163+
def chr(i: int) -> str:
11641164
"""Get a Unicode string representation of an integer.
11651165
11661166
Example: ``chr(97)``
11671167
1168-
:param __i: An integer within the range 0..1,114,111.
1168+
:param i: An integer within the range 0..1,114,111.
11691169
:return: A Unicode string representation of a number within a valid range.
11701170
"""
11711171
...
@@ -1231,7 +1231,7 @@ def help(request: object) -> None:
12311231
Example: ``help("print")``
12321232
"""
12331233
...
1234-
def hex(__number: int | SupportsIndex) -> str:
1234+
def hex(number: int | SupportsIndex) -> str:
12351235
"""Get the hexadecimal representation of an integer.
12361236
12371237
Example: ``hex(42)``
@@ -1278,7 +1278,7 @@ else:
12781278
__cls: type, __class_or_tuple: type | Tuple[type | Tuple[Any, ...], ...]
12791279
) -> bool: ...
12801280

1281-
def len(__obj: Sized) -> int:
1281+
def len(obj: Sized) -> int:
12821282
"""Get the length of, or number of items in an object.
12831283
12841284
Example: ``len("Hello, world")``
@@ -1438,12 +1438,12 @@ def open(
14381438
closefd: bool = ...,
14391439
opener: _Opener | None = ...,
14401440
) -> IO[Any]: ...
1441-
def ord(__c: str | bytes) -> int:
1441+
def ord(c: str | bytes) -> int:
14421442
"""Get an integer representation of a Unicode character.
14431443
14441444
Example: ``ord("a")``
14451445
1446-
:param __c: A Unicode character.
1446+
:param c: A Unicode character.
14471447
:return: The length of or number of items in an object.
14481448
"""
14491449
...

0 commit comments

Comments
 (0)