Skip to content

bpo-33907: Rename an IDLE module and classes. #7810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2018
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
4 changes: 2 additions & 2 deletions Lib/idlelib/calltip.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def close(self):

def _make_tk_calltip_window(self):
# See __init__ for usage
return calltip_w.Calltip(self.text)
return calltip_w.CalltipWindow(self.text)

def _remove_calltip_window(self, event=None):
if self.active_calltip:
Expand All @@ -44,7 +44,7 @@ def force_open_calltip_event(self, event):
return "break"

def try_open_calltip_event(self, event):
"""Happens when it would be nice to open a Calltip, but not really
"""Happens when it would be nice to open a calltip, but not really
necessary, for example after an opening bracket, so function calls
won't be made.
"""
Expand Down
8 changes: 4 additions & 4 deletions Lib/idlelib/calltip_w.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""A Calltip window class for Tkinter/IDLE.
"""A calltip window class for Tkinter/IDLE.

After tooltip.py, which uses ideas gleaned from PySol
Used by calltip.
Expand All @@ -13,7 +13,7 @@

MARK_RIGHT = "calltipwindowregion_right"

class Calltip:
class CalltipWindow:

def __init__(self, widget):
self.widget = widget
Expand Down Expand Up @@ -47,7 +47,7 @@ def position_window(self):
def showtip(self, text, parenleft, parenright):
"""Show the calltip, bind events which will close it and reposition it.
"""
# Only called in Calltip, where lines are truncated
# Only called in calltip.Calltip, where lines are truncated
self.text = text
if self.tipwindow or not self.text:
return
Expand Down Expand Up @@ -147,7 +147,7 @@ def _calltip_window(parent): # htest #
text.pack(side=LEFT, fill=BOTH, expand=1)
text.insert("insert", "string.split")
top.update()
calltip = Calltip(text)
calltip = CalltipWindow(text)

def calltip_show(event):
calltip.showtip("(s=Hello world)", "insert", "end")
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/idle_test/test_calltip_w.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
from tkinter import Tk, Text


class CallTipTest(unittest.TestCase):
class CallTipWindowTest(unittest.TestCase):

@classmethod
def setUpClass(cls):
requires('gui')
cls.root = Tk()
cls.root.withdraw()
cls.text = Text(cls.root)
cls.calltip = calltip_w.Calltip(cls.text)
cls.calltip = calltip_w.CalltipWindow(cls.text)

@classmethod
def tearDownClass(cls):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
For consistency and appearance, rename an IDLE module and class. Module
idlelib.calltips is now calltip. Class idlelib.calltip_w.CallTip is now
Calltip.
For consistency and clarity, rename an IDLE module and classes.
Module calltips and its class CallTips are now calltip and Calltip.
In module calltip_w, class CallTip is now CalltipWindow.