@@ -8,7 +8,7 @@ __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
+ if sys .version_info >= (3 , 10 ):
12
12
def compile_dir (
13
13
dir : StrPath ,
14
14
maxlevels : int | None = ...,
@@ -21,7 +21,7 @@ if sys.version_info >= (3, 9):
21
21
workers : int = ...,
22
22
invalidation_mode : PycInvalidationMode | None = ...,
23
23
* ,
24
- stripdir : str | None = ..., # TODO: change to StrPath | None once https://bugs.python.org/issue40447 is resolved
24
+ stripdir : StrPath | None = ...,
25
25
prependdir : StrPath | None = ...,
26
26
limit_sl_dest : StrPath | None = ...,
27
27
hardlink_dupes : bool = ...,
@@ -36,7 +36,41 @@ if sys.version_info >= (3, 9):
36
36
optimize : int = ...,
37
37
invalidation_mode : PycInvalidationMode | None = ...,
38
38
* ,
39
- stripdir : str | None = ..., # TODO: change to StrPath | None once https://bugs.python.org/issue40447 is resolved
39
+ stripdir : StrPath | None = ...,
40
+ prependdir : StrPath | None = ...,
41
+ limit_sl_dest : StrPath | None = ...,
42
+ hardlink_dupes : bool = ...,
43
+ ) -> int : ...
44
+
45
+ elif sys .version_info >= (3 , 9 ):
46
+ def compile_dir (
47
+ dir : StrPath ,
48
+ maxlevels : int | None = ...,
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
+ * ,
58
+ stripdir : str | None = ..., # https://bugs.python.org/issue40447
59
+ prependdir : StrPath | None = ...,
60
+ limit_sl_dest : StrPath | None = ...,
61
+ hardlink_dupes : bool = ...,
62
+ ) -> int : ...
63
+ def compile_file (
64
+ fullname : StrPath ,
65
+ ddir : StrPath | None = ...,
66
+ force : bool = ...,
67
+ rx : _SupportsSearch | None = ...,
68
+ quiet : int = ...,
69
+ legacy : bool = ...,
70
+ optimize : int = ...,
71
+ invalidation_mode : PycInvalidationMode | None = ...,
72
+ * ,
73
+ stripdir : str | None = ..., # https://bugs.python.org/issue40447
40
74
prependdir : StrPath | None = ...,
41
75
limit_sl_dest : StrPath | None = ...,
42
76
hardlink_dupes : bool = ...,
0 commit comments