massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / ntpath.pyi
1 import sys
2 from _typeshed import BytesPath, StrPath
3 from genericpath import (
4     commonprefix as commonprefix,
5     exists as exists,
6     getatime as getatime,
7     getctime as getctime,
8     getmtime as getmtime,
9     getsize as getsize,
10     isdir as isdir,
11     isfile as isfile,
12     samefile as samefile,
13     sameopenfile as sameopenfile,
14     samestat as samestat,
15 )
16 from os import PathLike
17
18 # Re-export common definitions from posixpath to reduce duplication
19 from posixpath import (
20     abspath as abspath,
21     basename as basename,
22     commonpath as commonpath,
23     curdir as curdir,
24     defpath as defpath,
25     devnull as devnull,
26     dirname as dirname,
27     expanduser as expanduser,
28     expandvars as expandvars,
29     extsep as extsep,
30     isabs as isabs,
31     islink as islink,
32     ismount as ismount,
33     lexists as lexists,
34     normcase as normcase,
35     normpath as normpath,
36     pardir as pardir,
37     pathsep as pathsep,
38     relpath as relpath,
39     sep as sep,
40     split as split,
41     splitdrive as splitdrive,
42     splitext as splitext,
43     supports_unicode_filenames as supports_unicode_filenames,
44 )
45 from typing import AnyStr, overload
46
47 altsep: str
48 if sys.version_info < (3, 7) and sys.platform == "win32":
49     def splitunc(p: AnyStr) -> tuple[AnyStr, AnyStr]: ...  # deprecated
50
51 # Similar to posixpath, but have slightly different argument names
52 @overload
53 def join(path: StrPath, *paths: StrPath) -> str: ...
54 @overload
55 def join(path: BytesPath, *paths: BytesPath) -> bytes: ...
56
57 if sys.platform == "win32":
58     if sys.version_info >= (3, 10):
59         @overload
60         def realpath(path: PathLike[AnyStr], *, strict: bool = ...) -> AnyStr: ...
61         @overload
62         def realpath(path: AnyStr, *, strict: bool = ...) -> AnyStr: ...
63     else:
64         @overload
65         def realpath(path: PathLike[AnyStr]) -> AnyStr: ...
66         @overload
67         def realpath(path: AnyStr) -> AnyStr: ...
68
69 else:
70     realpath = abspath