mirror of
https://github.com/python/cpython.git
synced 2025-11-08 17:41:42 +00:00
gh-113978: Ignore warnings on text completion inside REPL (#113979)
This commit is contained in:
parent
9db2fd7eda
commit
e03dde5a24
2 changed files with 7 additions and 4 deletions
|
|
@ -35,6 +35,7 @@
|
||||||
import keyword
|
import keyword
|
||||||
import re
|
import re
|
||||||
import __main__
|
import __main__
|
||||||
|
import warnings
|
||||||
|
|
||||||
__all__ = ["Completer"]
|
__all__ = ["Completer"]
|
||||||
|
|
||||||
|
|
@ -88,6 +89,7 @@ def complete(self, text, state):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if state == 0:
|
if state == 0:
|
||||||
|
with warnings.catch_warnings(action="ignore"):
|
||||||
if "." in text:
|
if "." in text:
|
||||||
self.matches = self.attr_matches(text)
|
self.matches = self.attr_matches(text)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Ignore warnings on text completion inside REPL.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue