mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Add optimize parameter to builtins.compile. (#2605)
In Python 3, `builtins.compile` takes 6 arguments (`source`, `filename`, `mode`, `flags=0`, `dont_inherit=False`, `optimize=-1`). This change adds the last `optimize` parameter, which is new since Python 2.
This commit is contained in:
committed by
Jelle Zijlstra
parent
232b7c5147
commit
b29b239f17
@@ -802,9 +802,9 @@ if sys.version_info >= (3, 6):
|
||||
# See https://github.com/python/typeshed/pull/991#issuecomment-288160993
|
||||
class _PathLike(Generic[AnyStr]):
|
||||
def __fspath__(self) -> AnyStr: ...
|
||||
def compile(source: Any, filename: Union[str, bytes, _PathLike], mode: str, flags: int = ..., dont_inherit: int = ...) -> CodeType: ...
|
||||
def compile(source: Any, filename: Union[str, bytes, _PathLike], mode: str, flags: int = ..., dont_inherit: int = ..., optimize: int = ...) -> CodeType: ...
|
||||
else:
|
||||
def compile(source: Any, filename: Union[str, bytes], mode: str, flags: int = ..., dont_inherit: int = ...) -> CodeType: ...
|
||||
def compile(source: Any, filename: Union[str, bytes], mode: str, flags: int = ..., dont_inherit: int = ..., optimize: int = ...) -> CodeType: ...
|
||||
def copyright() -> None: ...
|
||||
def credits() -> None: ...
|
||||
def delattr(o: Any, name: str) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user