stdlib: audit more callback annotations (#8209)

This commit is contained in:
Alex Waygood
2022-07-19 15:07:25 +01:00
committed by GitHub
parent 540a6b25bf
commit e2ce7c6344
21 changed files with 61 additions and 64 deletions

View File

@@ -82,17 +82,15 @@ else:
ignore_dangling_symlinks: bool = ...,
) -> _PathReturn: ...
_OnErrorCallback: TypeAlias = Callable[[Callable[..., Any], Any, Any], object]
if sys.version_info >= (3, 11):
def rmtree(
path: StrOrBytesPath,
ignore_errors: bool = ...,
onerror: Callable[[Any, Any, Any], Any] | None = ...,
*,
dir_fd: int | None = ...,
path: StrOrBytesPath, ignore_errors: bool = ..., onerror: _OnErrorCallback | None = ..., *, dir_fd: int | None = ...
) -> None: ...
else:
def rmtree(path: StrOrBytesPath, ignore_errors: bool = ..., onerror: Callable[[Any, Any, Any], Any] | None = ...) -> None: ...
def rmtree(path: StrOrBytesPath, ignore_errors: bool = ..., onerror: _OnErrorCallback | None = ...) -> None: ...
_CopyFn: TypeAlias = Callable[[str, str], object] | Callable[[StrPath, StrPath], object]