Add missing symtable methods (#6430)

Both added in https://bugs.python.org/issue34983
This commit is contained in:
Alex Waygood
2021-11-28 16:06:36 +00:00
committed by GitHub
parent 99f6e022f7
commit 77d820c76c

View File

@@ -23,6 +23,8 @@ class Function(SymbolTable):
def get_locals(self) -> Tuple[str, ...]: ...
def get_globals(self) -> Tuple[str, ...]: ...
def get_frees(self) -> Tuple[str, ...]: ...
if sys.version_info >= (3, 8):
def get_nonlocals(self) -> Tuple[str, ...]: ...
class Class(SymbolTable):
def get_methods(self) -> Tuple[str, ...]: ...
@@ -32,6 +34,7 @@ class Symbol(object):
def __init__(
self, name: str, flags: int, namespaces: Sequence[SymbolTable] | None = ..., *, module_scope: bool = ...
) -> None: ...
def is_nonlocal(self) -> bool: ...
else:
def __init__(self, name: str, flags: int, namespaces: Sequence[SymbolTable] | None = ...) -> None: ...
def get_name(self) -> str: ...