8000 builtins.pyi: Use two type vars (#3291) · python/typeshed@fa571fb · GitHub
[go: up one dir, main page]

Skip to content

Commit fa571fb

Browse files
utkarsh2102srittau
authored andcommitted
builtins.pyi: Use two type vars (#3291)
Fixes: #3201
1 parent 9a1d205 commit fa571fb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

stdlib/2/__builtin__.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,9 @@ else:
11891189
@overload
11901190
def iter(__iterable: Iterable[_T]) -> Iterator[_T]: ...
11911191
@overload
1192-
def iter(__function: Callable[[], _T], __sentinel: _T) -> Iterator[_T]: ...
1192+
def iter(__function: Callable[[], Optional[_T]], __sentinel: None) -> Iterator[_T]: ...
1193+
@overload
1194+
def iter(__function: Callable[[], Any], __sentinel: Any) -> Iterator[Any]: ...
11931195
def isinstance(__o: object, __t: Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]) -> bool: ...
11941196
def issubclass(__cls: type, __classinfo: Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]) -> bool: ...
11951197
def len(__o: Sized) -> int: ...

stdlib/2and3/builtins.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,9 @@ else:
11891189
@overload
11901190
def iter(__iterable: Iterable[_T]) -> Iterator[_T]: ...
11911191
@overload
1192-
def iter(__function: Callable[[], _T], __sentinel: _T) -> Iterator[_T]: ...
1192+
def iter(__function: Callable[[], Optional[_T]], __sentinel: None) -> Iterator[_T]: ...
1193+
@overload
1194+
def iter(__function: Callable[[], Any], __sentinel: Any) -> Iterator[Any]: ...
11931195
def isinstance(__o: object, __t: Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]) -> bool: ...
11941196
def issubclass(__cls: type, __classinfo: Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]) -> bool: ...
11951197
def len(__o: Sized) -> int: ...

0 commit comments

Comments
 (0)
0