mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +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: ...
|
||||
|
||||
Reference in New Issue
Block a user