@@ -8,7 +8,42 @@ __all__ = ["compile_dir", "compile_file", "compile_path"]
8
8
class _SupportsSearch (Protocol ):
9
9
def search (self , string : str ) -> Any : ...
10
10
11
- if sys .version_info >= (3 , 9 ):
11
+
12
+ if sys .version_info >= (3 , 10 ):
13
+ def compile_dir (
14
+ dir : StrPath ,
15
+ maxlevels : int | None = ...,
16
+ ddir : StrPath | None = ...,
17
+ force : bool = ...,
18
+ rx : _SupportsSearch | None = ...,
19
+ quiet : int = ...,
20
+ legacy : bool = ...,
21
+ optimize : int = ...,
22
+ workers : int = ...,
23
+ invalidation_mode : PycInvalidationMode | None = ...,
24
+ * ,
25
+ stripdir : StrPath | None = ...,
26
+ prependdir : StrPath | None = ...,
27
+ limit_sl_dest : StrPath | None = ...,
28
+ hardlink_dupes : bool = ...,
29
+ ) -> int : ...
30
+ def compile_file (
31
+ fullname : StrPath ,
32
+ ddir : StrPath | None = ...,
33
+ force : bool = ...,
34
+ rx : _SupportsSearch | None = ...,
35
+ quiet : int = ...,
36
+ legacy : bool = ...,
37
+ optimize : int = ...,
38
+ invalidation_mode : PycInvalidationMode | None = ...,
39
+ * ,
40
+ stripdir : StrPath | None = ...,
41
+ prependdir : StrPath | None = ...,
42
+ limit_sl_dest : StrPath | None = ...,
43
+ hardlink_dupes : bool = ...,
44
+ ) -> int : ...
45
+
46
+ elif sys .version_info >= (3 , 9 ):
12
47
def compile_dir (
13
48
dir : StrPath ,
14
49
maxlevels : int | None = ...,
@@ -21,7 +56,7 @@ if sys.version_info >= (3, 9):
21
56
workers : int = ...,
22
57
invalidation_mode : PycInvalidationMode | None = ...,
23
58
* ,
24
- stripdir : str | None = ..., # TODO: change to StrPath | None once https://bugs.python.org/issue40447 is resolved
59
+ stripdir : str | None = ..., # https://bugs.python.org/issue40447
25
60
prependdir : StrPath | None = ...,
26
61
limit_sl_dest : StrPath | None = ...,
27
62
hardlink_dupes : bool = ...,
@@ -36,7 +71,7 @@ if sys.version_info >= (3, 9):
36
71
optimize : int = ...,
37
72
invalidation_mode : PycInvalidationMode | None = ...,
38
73
* ,
39
- stripdir : str | None = ..., # TODO: change to StrPath | None once https://bugs.python.org/issue40447 is resolved
74
+ stripdir : str | None = ..., # https://bugs.python.org/issue40447
40
75
prependdir : StrPath | None = ...,
41
76
limit_sl_dest : StrPath | None = ...,
42
77
hardlink_dupes : bool = ...,
0 commit comments