From 967f83db091399ae6fdeb7c677e3cf04c39ee417 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 7 Mar 2022 19:07:58 -0500 Subject: [PATCH] rlcompleter: add attr_matches, global_matches (#7453) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood --- stdlib/@python2/rlcompleter.pyi | 2 ++ stdlib/rlcompleter.pyi | 2 ++ tests/stubtest_allowlists/py3_common.txt | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stdlib/@python2/rlcompleter.pyi b/stdlib/@python2/rlcompleter.pyi index fcd385f33..e075e241b 100644 --- a/stdlib/@python2/rlcompleter.pyi +++ b/stdlib/@python2/rlcompleter.pyi @@ -5,3 +5,5 @@ _Text = Union[str, unicode] class Completer: def __init__(self, namespace: dict[str, Any] | None = ...) -> None: ... def complete(self, text: _Text, state: int) -> str | None: ... + def attr_matches(self, text: _Text) -> list[str]: ... + def global_matches(self, text: _Text) -> list[str]: ... diff --git a/stdlib/rlcompleter.pyi b/stdlib/rlcompleter.pyi index a73ba8db1..1840b7cfc 100644 --- a/stdlib/rlcompleter.pyi +++ b/stdlib/rlcompleter.pyi @@ -5,3 +5,5 @@ __all__ = ["Completer"] class Completer: def __init__(self, namespace: dict[str, Any] | None = ...) -> None: ... def complete(self, text: str, state: int) -> str | None: ... + def attr_matches(self, text: str) -> list[str]: ... + def global_matches(self, text: str) -> list[str]: ... diff --git a/tests/stubtest_allowlists/py3_common.txt b/tests/stubtest_allowlists/py3_common.txt index 68ff94918..13ac388e7 100644 --- a/tests/stubtest_allowlists/py3_common.txt +++ b/tests/stubtest_allowlists/py3_common.txt @@ -737,8 +737,6 @@ multiprocessing.managers.SyncManager.Pool multiprocessing.pool.Pool.Process multiprocessing.pool.ThreadPool.Process multiprocessing.synchronize.Semaphore.get_value -rlcompleter.Completer.attr_matches -rlcompleter.Completer.global_matches tkinter.Misc.config tkinter.font.Font.counter tkinter.simpledialog.Dialog.apply