From 679a6e5669851e5dd4bce7c567e80e4aacb0fa65 Mon Sep 17 00:00:00 2001 From: Danny Weinberg Date: Mon, 5 Dec 2016 11:41:53 -0800 Subject: [PATCH] Give shutil.which a return annotation (#744) --- stdlib/3/shutil.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/3/shutil.pyi b/stdlib/3/shutil.pyi index 13075979a..c0745e368 100644 --- a/stdlib/3/shutil.pyi +++ b/stdlib/3/shutil.pyi @@ -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]: ...