mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Update compileall stripdir type (#9404)
See https://github.com/python/cpython/pull/19883
This commit is contained in:
@@ -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 = ...,
|
||||
@@ -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 = ...,
|
||||
@@ -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 = ...,
|
||||
|
||||
Reference in New Issue
Block a user