summaryrefslogtreecommitdiffstats
path: root/Lib/_pyrepl/_module_completer.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2025-05-25 23:33:02 (GMT)
committerGitHub <noreply@github.com>2025-05-25 23:33:02 (GMT)
commit7216f7b59c30313fa27a30765fc7340df2f5ccef (patch)
tree902882307ed300e3ddab178a18fa3faeaa437694 /Lib/_pyrepl/_module_completer.py
parent1822f33b1af989ebb9e7a5b58bd40721fca9a218 (diff)
downloadcpython-7216f7b59c30313fa27a30765fc7340df2f5ccef.zip
cpython-7216f7b59c30313fa27a30765fc7340df2f5ccef.tar.gz
cpython-7216f7b59c30313fa27a30765fc7340df2f5ccef.tar.bz2
[3.14] gh-69605: Disable PyREPL module autocomplete fallback on regular completion (gh-134181) (gh-134680)
(cherry picked from commit 0e3bc962c6462f836751e35ef35fa837fd952550) Co-authored-by: Loïc Simon <loic.simon@napta.io>
Diffstat (limited to 'Lib/_pyrepl/_module_completer.py')
-rw-r--r--Lib/_pyrepl/_module_completer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/_pyrepl/_module_completer.py b/Lib/_pyrepl/_module_completer.py
index 494a501..1e9462a 100644
--- a/Lib/_pyrepl/_module_completer.py
+++ b/Lib/_pyrepl/_module_completer.py
@@ -42,11 +42,11 @@ class ModuleCompleter:
self._global_cache: list[pkgutil.ModuleInfo] = []
self._curr_sys_path: list[str] = sys.path[:]
- def get_completions(self, line: str) -> list[str]:
+ def get_completions(self, line: str) -> list[str] | None:
"""Return the next possible import completions for 'line'."""
result = ImportParser(line).parse()
if not result:
- return []
+ return None
try:
return self.complete(*result)
except Exception: