mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
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:
committed by
Jukka Lehtosalo
parent
e7db9cda4d
commit
af5b5c83fd
@@ -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: ...
|
||||
|
||||
@@ -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 = ...,
|
||||
|
||||
Reference in New Issue
Block a user