mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-17 00:25:05 +08:00
Stubtest exceptions for sys, symtable, sysconfig and tarfile (#5138)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import sys
|
||||
from typing import List, Sequence, Text, Tuple
|
||||
from typing import Any, List, Optional, Sequence, Text, Tuple
|
||||
|
||||
def symtable(code: Text, filename: Text, compile_type: Text) -> SymbolTable: ...
|
||||
|
||||
class SymbolTable(object):
|
||||
def __init__(self, raw_table: Any, filename: str) -> None: ...
|
||||
def get_type(self) -> str: ...
|
||||
def get_id(self) -> int: ...
|
||||
def get_name(self) -> str: ...
|
||||
@@ -29,6 +30,12 @@ class Class(SymbolTable):
|
||||
def get_methods(self) -> Tuple[str, ...]: ...
|
||||
|
||||
class Symbol(object):
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(
|
||||
self, name: str, flags: int, namespaces: Optional[Sequence[SymbolTable]] = ..., *, module_scope: bool = ...
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(self, name: str, flags: int, namespaces: Optional[Sequence[SymbolTable]] = ...) -> None: ...
|
||||
def get_name(self) -> str: ...
|
||||
def is_referenced(self) -> bool: ...
|
||||
def is_parameter(self) -> bool: ...
|
||||
|
||||
@@ -11,7 +11,7 @@ def get_path(name: str, scheme: str = ..., vars: Optional[Dict[str, Any]] = ...,
|
||||
def get_paths(scheme: str = ..., vars: Optional[Dict[str, Any]] = ..., expand: bool = ...) -> Dict[str, str]: ...
|
||||
def get_python_version() -> str: ...
|
||||
def get_platform() -> str: ...
|
||||
def is_python_build() -> bool: ...
|
||||
def parse_config_h(fp: IO[Any], vars: Optional[Dict[str, Any]]) -> Dict[str, Any]: ...
|
||||
def is_python_build(check_home: bool = ...) -> bool: ...
|
||||
def parse_config_h(fp: IO[Any], vars: Optional[Dict[str, Any]] = ...) -> Dict[str, Any]: ...
|
||||
def get_config_h_filename() -> str: ...
|
||||
def get_makefile_filename() -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user