Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Lib/rlcompleter.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@
import keyword
import re
import __main__
import warnings

__all__ = ["Completer"]

Expand DownExpand Up@@ -88,10 +89,11 @@ def complete(self, text, state):
return None

if state == 0:
if "." in text:
self.matches = self.attr_matches(text)
else:
self.matches = self.global_matches(text)
with warnings.catch_warnings(action="ignore"):
if "." in text:
self.matches = self.attr_matches(text)
else:
self.matches = self.global_matches(text)
try:
return self.matches[state]
except IndexError:
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
Ignore warnings on text completion inside REPL.