massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / macpath.pyi
1 from _typeshed import BytesPath, StrOrBytesPath, StrPath
2 from genericpath import (
3     commonprefix as commonprefix,
4     exists as exists,
5     getatime as getatime,
6     getctime as getctime,
7     getmtime as getmtime,
8     getsize as getsize,
9     isdir as isdir,
10     isfile as isfile,
11     samefile as samefile,
12     sameopenfile as sameopenfile,
13     samestat as samestat,
14 )
15 from os import PathLike
16
17 # Re-export common definitions from posixpath to reduce duplication
18 from posixpath import (
19     abspath as abspath,
20     curdir as curdir,
21     defpath as defpath,
22     devnull as devnull,
23     expanduser as expanduser,
24     expandvars as expandvars,
25     extsep as extsep,
26     isabs as isabs,
27     lexists as lexists,
28     pardir as pardir,
29     pathsep as pathsep,
30     sep as sep,
31     splitdrive as splitdrive,
32     splitext as splitext,
33     supports_unicode_filenames as supports_unicode_filenames,
34 )
35 from typing import AnyStr, overload
36
37 altsep: str | None
38
39 @overload
40 def basename(s: PathLike[AnyStr]) -> AnyStr: ...
41 @overload
42 def basename(s: AnyStr) -> AnyStr: ...
43 @overload
44 def dirname(s: PathLike[AnyStr]) -> AnyStr: ...
45 @overload
46 def dirname(s: AnyStr) -> AnyStr: ...
47 @overload
48 def normcase(path: PathLike[AnyStr]) -> AnyStr: ...
49 @overload
50 def normcase(path: AnyStr) -> AnyStr: ...
51 @overload
52 def normpath(s: PathLike[AnyStr]) -> AnyStr: ...
53 @overload
54 def normpath(s: AnyStr) -> AnyStr: ...
55 @overload
56 def realpath(path: PathLike[AnyStr]) -> AnyStr: ...
57 @overload
58 def realpath(path: AnyStr) -> AnyStr: ...
59 def islink(s: StrOrBytesPath) -> bool: ...
60
61 # Mypy complains that the signatures overlap, but things seem to behave correctly anyway.
62 @overload
63 def join(s: StrPath, *paths: StrPath) -> str: ...
64 @overload
65 def join(s: BytesPath, *paths: BytesPath) -> bytes: ...
66 @overload
67 def split(s: PathLike[AnyStr]) -> tuple[AnyStr, AnyStr]: ...
68 @overload
69 def split(s: AnyStr) -> tuple[AnyStr, AnyStr]: ...