@@ -8,7 +8,8 @@ __all__ = ["compile_dir", "compile_file", "compile_path"]
88class _SupportsSearch (Protocol ):
99 def search (self , string : str ) -> Any : ...
1010
11- if sys .version_info >= (3 , 9 ):
11+
12+ if sys .version_info >= (3 , 10 ):
1213 def compile_dir (
1314 dir : StrPath ,
1415 maxlevels : int | None = ...,
@@ -21,7 +22,41 @@ if sys.version_info >= (3, 9):
2122 workers : int = ...,
2223 invalidation_mode : PycInvalidationMode | None = ...,
2324 * ,
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
2560 prependdir : StrPath | None = ...,
2661 limit_sl_dest : StrPath | None = ...,
2762 hardlink_dupes : bool = ...,
0 commit comments