mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 12:21:27 +08:00
Fix incorrectly Optional builtin function args (#500)
Many builtin functions were accidentally marked as Optional because they were given default values of None.
This commit is contained in:
@@ -337,7 +337,7 @@ class str(basestring, Sequence[str]):
|
||||
def strip(self, chars: unicode) -> unicode: ...
|
||||
def swapcase(self) -> str: ...
|
||||
def title(self) -> str: ...
|
||||
def translate(self, table: AnyStr, deletechars: AnyStr = None) -> AnyStr: ...
|
||||
def translate(self, table: Optional[AnyStr], deletechars: AnyStr = ...) -> AnyStr: ...
|
||||
def upper(self) -> str: ...
|
||||
def zfill(self, width: int) -> str: ...
|
||||
|
||||
@@ -564,7 +564,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
class set(MutableSet[_T], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T]=None) -> None: ...
|
||||
def __init__(self, iterable: Iterable[_T] = ...) -> None: ...
|
||||
def add(self, element: _T) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def copy(self) -> set[_T]: ...
|
||||
@@ -702,13 +702,13 @@ def map(func: Callable[[_T1, _T2], _S],
|
||||
iter1: Iterable[_T1],
|
||||
iter2: Iterable[_T2]) -> List[_S]: ... # TODO more than two iterables
|
||||
@overload
|
||||
def max(arg1: _T, arg2: _T, *args: _T, key: Callable[[_T], Any] = None) -> _T: ...
|
||||
def max(arg1: _T, arg2: _T, *args: _T, key: Callable[[_T], Any] = ...) -> _T: ...
|
||||
@overload
|
||||
def max(iterable: Iterable[_T], key: Callable[[_T], Any] = None) -> _T: ...
|
||||
def max(iterable: Iterable[_T], key: Callable[[_T], Any] = ...) -> _T: ...
|
||||
@overload
|
||||
def min(arg1: _T, arg2: _T, *args: _T, key: Callable[[_T], Any] = None) -> _T: ...
|
||||
def min(arg1: _T, arg2: _T, *args: _T, key: Callable[[_T], Any] = ...) -> _T: ...
|
||||
@overload
|
||||
def min(iterable: Iterable[_T], key: Callable[[_T], Any] = None) -> _T: ...
|
||||
def min(iterable: Iterable[_T], key: Callable[[_T], Any] = ...) -> _T: ...
|
||||
@overload
|
||||
def next(i: Iterator[_T]) -> _T: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user