bpo-38792: Remove IDLE shell calltip before new prompt. (#17150)

Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
This commit is contained in:
Zackery Spytz 2020-01-30 18:55:42 -07:00 committed by GitHub
parent 46874c26ee
commit bfdeaa37b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 3 deletions

View file

@ -33,7 +33,7 @@ class Calltip:
# See __init__ for usage
return calltip_w.CalltipWindow(self.text)
def _remove_calltip_window(self, event=None):
def remove_calltip_window(self, event=None):
if self.active_calltip:
self.active_calltip.hidetip()
self.active_calltip = None
@ -55,7 +55,7 @@ class Calltip:
self.open_calltip(False)
def open_calltip(self, evalfuncs):
self._remove_calltip_window()
self.remove_calltip_window()
hp = HyperParser(self.editwin, "insert")
sur_paren = hp.get_surrounding_brackets('(')