move CodeType into types.pyi

This commit is contained in:
Matthias Kramm
2015-10-12 10:38:45 -07:00
parent 793f3399a7
commit 7709b96e05
2 changed files with 2 additions and 18 deletions

View File

@@ -597,23 +597,6 @@ class module:
__file__ = ''
__dict__ = ... # type: Dict[unicode, Any]
# A.k.a. types.CodeType
class code:
co_argcount = ... # type: int
co_cellvars = ... # type: Tuple[str]
co_code = ... # type: str
co_consts = ... # type: Tuple[str]
co_filename = ... # type: Optional[str]
co_firstlineno = ... # type: int
co_flags = ... # type: int
co_freevars = ... # type: Tuple[str]
co_lnotab = ... # type: str
co_name = ... # type: str
co_names = ... # type: Tuple[str]
co_nlocals= ... # type: int
co_stacksize= ... # type: int
co_varnames = ... # type: Tuple[str]
True = ... # type: bool
False = ... # type: bool
__debug__ = False

View File

@@ -1,6 +1,7 @@
"""Stub file for the 'zipimport' module."""
from typing import Dict, Optional
from types import CodeType
class ZipImportError(ImportError):
pass
@@ -14,7 +15,7 @@ class zipimporter(object):
def __init__(self, path: str) -> None:
raise ZipImportError
def find_module(self, fullname: str, path: str = ...) -> Optional[zipimporter]: ...
def get_code(self, fullname: str) -> code: ...
def get_code(self, fullname: str) -> types.CodeType: ...
def get_data(self, fullname: str) -> str:
raise IOError
def get_filename(self, fullname: str) -> str: ...