mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
@@ -2,11 +2,6 @@ import sys
|
||||
from _typeshed import AnyPath
|
||||
from typing import Any, Optional, Pattern
|
||||
|
||||
if sys.version_info < (3, 6):
|
||||
_SuccessType = bool
|
||||
else:
|
||||
_SuccessType = int
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
from py_compile import PycInvalidationMode
|
||||
|
||||
@@ -27,7 +22,7 @@ if sys.version_info >= (3, 9):
|
||||
prependdir: Optional[AnyPath] = ...,
|
||||
limit_sl_dest: Optional[AnyPath] = ...,
|
||||
hardlink_dupes: bool = ...,
|
||||
) -> _SuccessType: ...
|
||||
) -> int: ...
|
||||
def compile_file(
|
||||
fullname: AnyPath,
|
||||
ddir: Optional[AnyPath] = ...,
|
||||
@@ -42,7 +37,7 @@ if sys.version_info >= (3, 9):
|
||||
prependdir: Optional[AnyPath] = ...,
|
||||
limit_sl_dest: Optional[AnyPath] = ...,
|
||||
hardlink_dupes: bool = ...,
|
||||
) -> _SuccessType: ...
|
||||
) -> int: ...
|
||||
|
||||
elif sys.version_info >= (3, 7):
|
||||
def compile_dir(
|
||||
@@ -56,7 +51,7 @@ elif sys.version_info >= (3, 7):
|
||||
optimize: int = ...,
|
||||
workers: int = ...,
|
||||
invalidation_mode: Optional[PycInvalidationMode] = ...,
|
||||
) -> _SuccessType: ...
|
||||
) -> int: ...
|
||||
def compile_file(
|
||||
fullname: AnyPath,
|
||||
ddir: Optional[AnyPath] = ...,
|
||||
@@ -66,7 +61,7 @@ elif sys.version_info >= (3, 7):
|
||||
legacy: bool = ...,
|
||||
optimize: int = ...,
|
||||
invalidation_mode: Optional[PycInvalidationMode] = ...,
|
||||
) -> _SuccessType: ...
|
||||
) -> int: ...
|
||||
|
||||
else:
|
||||
# rx can be any object with a 'search' method; once we have Protocols we can change the type
|
||||
@@ -80,7 +75,7 @@ else:
|
||||
legacy: bool = ...,
|
||||
optimize: int = ...,
|
||||
workers: int = ...,
|
||||
) -> _SuccessType: ...
|
||||
) -> int: ...
|
||||
def compile_file(
|
||||
fullname: AnyPath,
|
||||
ddir: Optional[AnyPath] = ...,
|
||||
@@ -89,7 +84,7 @@ else:
|
||||
quiet: int = ...,
|
||||
legacy: bool = ...,
|
||||
optimize: int = ...,
|
||||
) -> _SuccessType: ...
|
||||
) -> int: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def compile_path(
|
||||
@@ -100,7 +95,7 @@ if sys.version_info >= (3, 7):
|
||||
legacy: bool = ...,
|
||||
optimize: int = ...,
|
||||
invalidation_mode: Optional[PycInvalidationMode] = ...,
|
||||
) -> _SuccessType: ...
|
||||
) -> int: ...
|
||||
|
||||
else:
|
||||
def compile_path(
|
||||
@@ -110,4 +105,4 @@ else:
|
||||
quiet: int = ...,
|
||||
legacy: bool = ...,
|
||||
optimize: int = ...,
|
||||
) -> _SuccessType: ...
|
||||
) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user