diff options
Diffstat (limited to 'Lib/rlcompleter.py')
-rw-r--r-- | Lib/rlcompleter.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py index 206d6fb511c..23eb0020f42 100644 --- a/Lib/rlcompleter.py +++ b/Lib/rlcompleter.py @@ -35,6 +35,7 @@ import inspect import keyword import re import __main__ +import warnings __all__ = ["Completer"] @@ -88,10 +89,11 @@ class Completer: 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: |