@@ -8,7 +8,8 @@ __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 ):
12
13
def compile_dir (
13
14
dir : StrPath ,
14
15
maxlevels : int | None = ...,
@@ -21,7 +22,41 @@ if sys.version_info >= (3, 9):
21
22
workers : int = ...,
22
23
invalidation_mode : PycInvalidationMode | None = ...,
23
24
* ,
24
- stripdir : str | None = ..., # TODO: change to StrPath | None once https://bugs.python.org/issue40447 is resolved
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 ):
47
+ def compile_dir (
48
+ dir : StrPath ,
49
+ maxlevels : int | None = ...,
50
+ ddir : StrPath | None = ...,
51
+ force : bool = ...,
52
+ rx : _SupportsSearch | None = ...,
53
+ quiet : int = ...,
54
+ legacy : bool = ...,
55
+ optimize : int = ...,
56
+ workers : int = ...,
57
+ invalidation_mode : PycInvalidationMode | None = ...,
58
+ * ,
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 = ...,
0 commit comments