mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Support bytes paths in shutil.copy (#6866)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
import sys
|
||||
from _typeshed import StrOrBytesPath, StrPath, SupportsRead, SupportsWrite
|
||||
from _typeshed import BytesPath, StrOrBytesPath, StrPath, SupportsRead, SupportsWrite
|
||||
from typing import Any, AnyStr, Callable, Iterable, NamedTuple, Sequence, TypeVar, Union, overload
|
||||
|
||||
_PathT = TypeVar("_PathT", str, bytes, os.PathLike[str], os.PathLike[bytes])
|
||||
@@ -19,7 +19,10 @@ def copyfileobj(fsrc: SupportsRead[AnyStr], fdst: SupportsWrite[AnyStr], length:
|
||||
def copyfile(src: StrOrBytesPath, dst: _PathT, *, follow_symlinks: bool = ...) -> _PathT: ...
|
||||
def copymode(src: StrOrBytesPath, dst: StrOrBytesPath, *, follow_symlinks: bool = ...) -> None: ...
|
||||
def copystat(src: StrOrBytesPath, dst: StrOrBytesPath, *, follow_symlinks: bool = ...) -> None: ...
|
||||
@overload
|
||||
def copy(src: StrPath, dst: StrPath, *, follow_symlinks: bool = ...) -> _PathReturn: ...
|
||||
@overload
|
||||
def copy(src: BytesPath, dst: BytesPath, *, follow_symlinks: bool = ...) -> _PathReturn: ...
|
||||
def copy2(src: StrPath, dst: StrPath, *, follow_symlinks: bool = ...) -> _PathReturn: ...
|
||||
def ignore_patterns(*patterns: StrPath) -> Callable[[Any, list[str]], set[str]]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user