mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 20:31:32 +08:00
Give shutil.which a return annotation (#744)
This commit is contained in:
committed by
Guido van Rossum
parent
f447cbdc89
commit
679a6e5669
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user