mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 18:31:14 +08:00
Introduce _typeshed.GenericPath and _typeshed.AnyStr_co (#7970)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import StrOrBytesPath
|
||||
from _typeshed import GenericPath, StrOrBytesPath
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from os import PathLike
|
||||
from typing import Any, AnyStr, Generic
|
||||
from typing_extensions import Literal
|
||||
|
||||
@@ -15,17 +14,14 @@ BUFSIZE: Literal[8192]
|
||||
|
||||
def cmp(f1: StrOrBytesPath, f2: StrOrBytesPath, shallow: bool | Literal[0, 1] = ...) -> bool: ...
|
||||
def cmpfiles(
|
||||
a: AnyStr | PathLike[AnyStr],
|
||||
b: AnyStr | PathLike[AnyStr],
|
||||
common: Iterable[AnyStr | PathLike[AnyStr]],
|
||||
shallow: bool | Literal[0, 1] = ...,
|
||||
a: GenericPath[AnyStr], b: GenericPath[AnyStr], common: Iterable[GenericPath[AnyStr]], shallow: bool | Literal[0, 1] = ...
|
||||
) -> tuple[list[AnyStr], list[AnyStr], list[AnyStr]]: ...
|
||||
|
||||
class dircmp(Generic[AnyStr]):
|
||||
def __init__(
|
||||
self,
|
||||
a: AnyStr | PathLike[AnyStr],
|
||||
b: AnyStr | PathLike[AnyStr],
|
||||
a: GenericPath[AnyStr],
|
||||
b: GenericPath[AnyStr],
|
||||
ignore: Sequence[AnyStr] | None = ...,
|
||||
hide: Sequence[AnyStr] | None = ...,
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user