mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Add stub for codeop to 2and3 (#1534)
This commit is contained in:
committed by
Jelle Zijlstra
parent
9db63fee91
commit
4f14617db1
17
stdlib/2and3/codeop.pyi
Normal file
17
stdlib/2and3/codeop.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
# Source(py2): https://hg.python.org/cpython/file/2.7/Lib/codeop.py
|
||||
# Source(py3): https://github.com/python/cpython/blob/master/Lib/codeop.py
|
||||
|
||||
from types import CodeType
|
||||
from typing import Optional
|
||||
|
||||
def compile_command(source: str, filename: str = ..., symbol: str = ...) -> Optional[CodeType]: ...
|
||||
|
||||
class Compile:
|
||||
flags = ... # type: int
|
||||
def __init__(self) -> None: ...
|
||||
def __call__(self, source: str, filename: str, symbol: str) -> CodeType: ...
|
||||
|
||||
class CommandCompiler:
|
||||
compiler = ... # type: Compile
|
||||
def __init__(self) -> None: ...
|
||||
def __call__(self, source: str, filename: str = ..., symbol: str = ...) -> Optional[CodeType]: ...
|
||||
Reference in New Issue
Block a user