Make shutil.copytree stub's ignore parameter optional. (#740)

* Make `shutil.copytree` stub's `ignore` parameter optional.

* python2.7 shutil.copytree `ignore` annotated as optional.
This commit is contained in:
George King
2016-12-07 17:47:34 -05:00
committed by Jukka Lehtosalo
parent e7db9cda4d
commit af5b5c83fd
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
#
# NOTE: Based on a dynamically typed stub automatically generated by stubgen.
from typing import List, Iterable, Callable, IO, AnyStr, Any, Tuple, Sequence
from typing import List, Iterable, Callable, IO, AnyStr, Any, Optional, Tuple, Sequence
class Error(EnvironmentError): ...
class SpecialFileError(EnvironmentError): ...
@@ -16,7 +16,7 @@ def copy(src: unicode, dst: unicode) -> None: ...
def copy2(src: unicode, dst: unicode) -> None: ...
def ignore_patterns(*patterns: AnyStr) -> Callable[[AnyStr, List[AnyStr]], Iterable[AnyStr]]: ...
def copytree(src: AnyStr, dst: AnyStr, symlinks: bool = ...,
ignore: Callable[[AnyStr, List[AnyStr]], Iterable[AnyStr]] = ...) -> None: ...
ignore: Optional[Callable[[AnyStr, List[AnyStr]], Iterable[AnyStr]]] = ...) -> None: ...
def rmtree(path: AnyStr, ignore_errors: bool = ...,
onerror: Callable[[Any, AnyStr, Any], None] = ...) -> None: ...
def move(src: unicode, dst: unicode) -> None: ...

View File

@@ -20,7 +20,7 @@ def copy2(src: str, dst: str) -> None: ...
def ignore_patterns(*patterns: str) -> Callable[[str, List[str]],
Iterable[str]]: ...
def copytree(src: str, dst: str, symlinks: bool = ...,
ignore: Callable[[str, List[str]], Iterable[str]] = ...,
ignore: Optional[Callable[[str, List[str]], Iterable[str]]] = ...,
copy_function: Callable[[str, str], None] = ...,
ignore_dangling_symlinks: bool = ...) -> None: ...
def rmtree(path: str, ignore_errors: bool = ...,