mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
move CodeType into types.pyi
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user