Give shutil.which a return annotation (#744)

This commit is contained in:
Danny Weinberg
2016-12-05 11:41:53 -08:00
committed by Guido van Rossum
parent f447cbdc89
commit 679a6e5669

View File

@@ -7,7 +7,7 @@ import sys
# sometimes they only work partially (broken exception messages), and the test
# cases don't use them.
from typing import List, Iterable, Callable, Any, Tuple, Sequence, IO, AnyStr
from typing import List, Iterable, Callable, Any, Tuple, Sequence, IO, AnyStr, Optional
def copyfileobj(fsrc: IO[AnyStr], fdst: IO[AnyStr],
length: int = ...) -> None: ...
@@ -48,4 +48,4 @@ def register_unpack_format(name: str, extensions: List[str], function: Any,
def unregister_unpack_format(name: str) -> None: ...
def get_unpack_formats() -> List[Tuple[str, List[str], str]]: ...
def which(cmd: str, mode: int = ..., path: str = ...): ...
def which(cmd: str, mode: int = ..., path: str = ...) -> Optional[str]: ...