mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 08:47:39 +08:00
Swap order of overloads to fix filter without strict optional (#779)
Related to python/mypy#2587
This commit is contained in:
committed by
Guido van Rossum
parent
aa6f4a07c1
commit
beb9183103
@@ -697,9 +697,9 @@ def exec(object: str, globals: Dict[str, Any] = None,
|
||||
locals: Mapping[str, Any] = None) -> Any: ... # TODO code object as source
|
||||
def exit(code: int = None) -> None: ...
|
||||
@overload
|
||||
def filter(function: None, iterable: Iterable[Optional[_T]]) -> Iterator[_T]: ...
|
||||
@overload
|
||||
def filter(function: Callable[[_T], Any], iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
@overload
|
||||
def filter(function: None, iterable: Iterable[Optional[_T]]) -> Iterator[_T]: ...
|
||||
def format(o: object, format_spec: str = '') -> str: ...
|
||||
def getattr(o: Any, name: str, default: Any = ...) -> Any: ...
|
||||
def globals() -> Dict[str, Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user