Skip to content

Commit 1b59042

Browse files
committed
Update compileall stripdir type
See python/cpython#19883
1 parent 0220577 commit 1b59042

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

stdlib/compileall.pyi

+38-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,42 @@ __all__ = ["compile_dir", "compile_file", "compile_path"]
88
class _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):
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):
1247
def compile_dir(
1348
dir: StrPath,
1449
maxlevels: int | None = ...,
@@ -21,7 +56,7 @@ if sys.version_info >= (3, 9):
2156
workers: int = ...,
2257
invalidation_mode: PycInvalidationMode | None = ...,
2358
*,
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
2560
prependdir: StrPath | None = ...,
2661
limit_sl_dest: StrPath | None = ...,
2762
hardlink_dupes: bool = ...,
@@ -36,7 +71,7 @@ if sys.version_info >= (3, 9):
3671
optimize: int = ...,
3772
invalidation_mode: PycInvalidationMode | None = ...,
3873
*,
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
4075
prependdir: StrPath | None = ...,
4176
limit_sl_dest: StrPath | None = ...,
4277
hardlink_dupes: bool = ...,

0 commit comments

Comments
 (0)