Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 37 additions & 3 deletions stdlib/compileall.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ __all__ = ["compile_dir", "compile_file", "compile_path"]
class _SupportsSearch(Protocol):
def search(self, string: str) -> Any: ...

if sys.version_info >= (3, 9):
if sys.version_info >= (3, 10):
def compile_dir(
dir: StrPath,
maxlevels: int | None = ...,
Expand All @@ -21,7 +21,7 @@ if sys.version_info >= (3, 9):
workers: int = ...,
invalidation_mode: PycInvalidationMode | None = ...,
*,
stripdir: str | None = ..., # TODO: change to StrPath | None once https://bugs.python.org/issue40447 is resolved
stripdir: StrPath | None = ...,
prependdir: StrPath | None = ...,
limit_sl_dest: StrPath | None = ...,
hardlink_dupes: bool = ...,
Expand All @@ -36,7 +36,41 @@ if sys.version_info >= (3, 9):
optimize: int = ...,
invalidation_mode: PycInvalidationMode | None = ...,
*,
stripdir: str | None = ..., # TODO: change to StrPath | None once https://bugs.python.org/issue40447 is resolved
stripdir: StrPath | None = ...,
prependdir: StrPath | None = ...,
limit_sl_dest: StrPath | None = ...,
hardlink_dupes: bool = ...,
) -> int: ...

elif sys.version_info >= (3, 9):
def compile_dir(
dir: StrPath,
maxlevels: int | None = ...,
ddir: StrPath | None = ...,
force: bool = ...,
rx: _SupportsSearch | None = ...,
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
workers: int = ...,
invalidation_mode: PycInvalidationMode | None = ...,
*,
stripdir: str | None = ..., # https://bugs.python.org/issue40447
prependdir: StrPath | None = ...,
limit_sl_dest: StrPath | None = ...,
hardlink_dupes: bool = ...,
) -> int: ...
def compile_file(
fullname: StrPath,
ddir: StrPath | None = ...,
force: bool = ...,
rx: _SupportsSearch | None = ...,
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
invalidation_mode: PycInvalidationMode | None = ...,
*,
stripdir: str | None = ..., # https://bugs.python.org/issue40447
prependdir: StrPath | None = ...,
limit_sl_dest: StrPath | None = ...,
hardlink_dupes: bool = ...,
Expand Down