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
42 changes: 39 additions & 3 deletions stdlib/3/compileall.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ else:

if sys.version_info >= (3, 7):
from py_compile import PycInvalidationMode

if sys.version_info >= (3, 9):
def compile_dir(
dir: _Path,
maxlevels: int = ...,
maxlevels: Optional[int] = ...,
ddir: Optional[_Path] = ...,
force: bool = ...,
rx: Optional[Pattern[Any]] = ...,
Expand All @@ -24,6 +26,10 @@ if sys.version_info >= (3, 7):
optimize: int = ...,
workers: int = ...,
invalidation_mode: Optional[PycInvalidationMode] = ...,
*,
stripdir: Optional[str] = ..., # TODO: change to Optional[_Path] once https://bugs.python.org/issue40447 is resolved
prependdir: Optional[_Path] = ...,
limit_sl_dest: Optional[_Path] = ...,
) -> _SuccessType: ...
def compile_file(
fullname: _Path,
Expand All @@ -34,11 +40,29 @@ if sys.version_info >= (3, 7):
legacy: bool = ...,
optimize: int = ...,
invalidation_mode: Optional[PycInvalidationMode] = ...,
*,
stripdir: Optional[str] = ..., # TODO: change to Optional[_Path] once https://bugs.python.org/issue40447 is resolved
prependdir: Optional[_Path] = ...,
limit_sl_dest: Optional[_Path] = ...,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But these two really can be PathLike

) -> _SuccessType: ...
def compile_path(
skip_curdir: bool = ...,
elif sys.version_info >= (3, 7):
def compile_dir(
dir: _Path,
maxlevels: int = ...,
ddir: Optional[_Path] = ...,
force: bool = ...,
rx: Optional[Pattern[Any]] = ...,
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
workers: int = ...,
invalidation_mode: Optional[PycInvalidationMode] = ...,
) -> _SuccessType: ...
def compile_file(
fullname: _Path,
ddir: Optional[_Path] = ...,
force: bool = ...,
rx: Optional[Pattern[Any]] = ...,
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
Expand Down Expand Up @@ -67,6 +91,18 @@ else:
legacy: bool = ...,
optimize: int = ...,
) -> _SuccessType: ...

if sys.version_info >= (3, 7):
def compile_path(
skip_curdir: bool = ...,
maxlevels: int = ...,
force: bool = ...,
quiet: int = ...,
legacy: bool = ...,
optimize: int = ...,
invalidation_mode: Optional[PycInvalidationMode] = ...,
) -> _SuccessType: ...
else:
def compile_path(
skip_curdir: bool = ...,
maxlevels: int = ...,
Expand Down