massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / compileall.pyi
1 import sys
2 from _typeshed import StrPath
3 from typing import Any, Protocol
4
5 if sys.version_info >= (3, 7):
6     from py_compile import PycInvalidationMode
7
8 class _SupportsSearch(Protocol):
9     def search(self, string: str) -> Any: ...
10
11 if sys.version_info >= (3, 9):
12     def compile_dir(
13         dir: StrPath,
14         maxlevels: int | None = ...,
15         ddir: StrPath | None = ...,
16         force: bool = ...,
17         rx: _SupportsSearch | None = ...,
18         quiet: int = ...,
19         legacy: bool = ...,
20         optimize: int = ...,
21         workers: int = ...,
22         invalidation_mode: PycInvalidationMode | None = ...,
23         *,
24         stripdir: str | None = ...,  # TODO: change to StrPath | None once https://bugs.python.org/issue40447 is resolved
25         prependdir: StrPath | None = ...,
26         limit_sl_dest: StrPath | None = ...,
27         hardlink_dupes: bool = ...,
28     ) -> int: ...
29     def compile_file(
30         fullname: StrPath,
31         ddir: StrPath | None = ...,
32         force: bool = ...,
33         rx: _SupportsSearch | None = ...,
34         quiet: int = ...,
35         legacy: bool = ...,
36         optimize: int = ...,
37         invalidation_mode: PycInvalidationMode | None = ...,
38         *,
39         stripdir: str | None = ...,  # TODO: change to StrPath | None once https://bugs.python.org/issue40447 is resolved
40         prependdir: StrPath | None = ...,
41         limit_sl_dest: StrPath | None = ...,
42         hardlink_dupes: bool = ...,
43     ) -> int: ...
44
45 elif sys.version_info >= (3, 7):
46     def compile_dir(
47         dir: StrPath,
48         maxlevels: int = ...,
49         ddir: StrPath | None = ...,
50         force: bool = ...,
51         rx: _SupportsSearch | None = ...,
52         quiet: int = ...,
53         legacy: bool = ...,
54         optimize: int = ...,
55         workers: int = ...,
56         invalidation_mode: PycInvalidationMode | None = ...,
57     ) -> int: ...
58     def compile_file(
59         fullname: StrPath,
60         ddir: StrPath | None = ...,
61         force: bool = ...,
62         rx: _SupportsSearch | None = ...,
63         quiet: int = ...,
64         legacy: bool = ...,
65         optimize: int = ...,
66         invalidation_mode: PycInvalidationMode | None = ...,
67     ) -> int: ...
68
69 else:
70     def compile_dir(
71         dir: StrPath,
72         maxlevels: int = ...,
73         ddir: StrPath | None = ...,
74         force: bool = ...,
75         rx: _SupportsSearch | None = ...,
76         quiet: int = ...,
77         legacy: bool = ...,
78         optimize: int = ...,
79         workers: int = ...,
80     ) -> int: ...
81     def compile_file(
82         fullname: StrPath,
83         ddir: StrPath | None = ...,
84         force: bool = ...,
85         rx: _SupportsSearch | None = ...,
86         quiet: int = ...,
87         legacy: bool = ...,
88         optimize: int = ...,
89     ) -> int: ...
90
91 if sys.version_info >= (3, 7):
92     def compile_path(
93         skip_curdir: bool = ...,
94         maxlevels: int = ...,
95         force: bool = ...,
96         quiet: int = ...,
97         legacy: bool = ...,
98         optimize: int = ...,
99         invalidation_mode: PycInvalidationMode | None = ...,
100     ) -> int: ...
101
102 else:
103     def compile_path(
104         skip_curdir: bool = ...,
105         maxlevels: int = ...,
106         force: bool = ...,
107         quiet: int = ...,
108         legacy: bool = ...,
109         optimize: int = ...,
110     ) -> int: ...