From 18ecfbb914adc6c4f8a227948840c4e72e19889e Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Fri, 10 Jun 2022 07:38:09 -0700 Subject: [PATCH 1/2] Fix return type for SymbolTable.get_identifiers --- stdlib/symtable.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/symtable.pyi b/stdlib/symtable.pyi index 0f48bc9dadf8..308b19543582 100644 --- a/stdlib/symtable.pyi +++ b/stdlib/symtable.pyi @@ -1,5 +1,6 @@ import sys from collections.abc import Sequence +from _collections_abc import dict_keys from typing import Any __all__ = ["symtable", "SymbolTable", "Class", "Function", "Symbol"] @@ -18,7 +19,7 @@ class SymbolTable: if sys.version_info < (3, 9): def has_exec(self) -> bool: ... - def get_identifiers(self) -> Sequence[str]: ... + def get_identifiers(self) -> dict_keys[str, int]: ... def lookup(self, name: str) -> Symbol: ... def get_symbols(self) -> list[Symbol]: ... def get_children(self) -> list[SymbolTable]: ... From 179f50012fb84ed8294fb9e1c773a6f53b6b8b85 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 10 Jun 2022 14:42:01 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/symtable.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/symtable.pyi b/stdlib/symtable.pyi index 308b19543582..d44b2d7927b3 100644 --- a/stdlib/symtable.pyi +++ b/stdlib/symtable.pyi @@ -1,6 +1,6 @@ import sys -from collections.abc import Sequence from _collections_abc import dict_keys +from collections.abc import Sequence from typing import Any __all__ = ["symtable", "SymbolTable", "Class", "Function", "Symbol"]