]> granicus.if.org Git - python/commitdiff
bpo-33907: Rename an IDLE module and classes. (GH-7810)
authorTerry Jan Reedy <tjreedy@udel.edu>
Wed, 20 Jun 2018 06:18:49 +0000 (02:18 -0400)
committerGitHub <noreply@github.com>
Wed, 20 Jun 2018 06:18:49 +0000 (02:18 -0400)
Fix-up class name duplication in PR #7807. Combined effect is that
module calltips and its class CallTips are now calltip and Calltip.
In module calltip_w class CallTip is now CalltipWindow.

Lib/idlelib/calltip.py
Lib/idlelib/calltip_w.py
Lib/idlelib/idle_test/test_calltip_w.py
Misc/NEWS.d/next/IDLE/2018-06-19-22-21-27.bpo-33907.z-_B3N.rst

index 1ff0deb968444db9f947eed649af65bcc7e4a7e2..596d2bcb277599f76d8e8802fdb92481c11c3c7e 100644 (file)
@@ -31,7 +31,7 @@ class Calltip:
 
     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:
@@ -44,7 +44,7 @@ class Calltip:
         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.
         """
index b75e4c27db34e7b2a19002249b391aa7f0654273..34531f431a6763b9e07ea62601a2fe3d63d9cc8a 100644 (file)
@@ -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.
@@ -13,7 +13,7 @@ CHECKHIDE_TIME = 100 # milliseconds
 
 MARK_RIGHT = "calltipwindowregion_right"
 
-class Calltip:
+class CalltipWindow:
 
     def __init__(self, widget):
         self.widget = widget
@@ -47,7 +47,7 @@ class Calltip:
     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
@@ -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")
index fc1f11140035525d2c184335aa99435c999ae6fd..59e69677e679a460563752b413f456a4db666f47 100644 (file)
@@ -6,7 +6,7 @@ from test.support import requires
 from tkinter import Tk, Text
 
 
-class CallTipTest(unittest.TestCase):
+class CallTipWindowTest(unittest.TestCase):
 
     @classmethod
     def setUpClass(cls):
@@ -14,7 +14,7 @@ class CallTipTest(unittest.TestCase):
         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):
index 9c5a070e88edd7673b206af386ce68a3a015a96b..b4741060bb21e3afb67462f5709cd4a9dfc8d86f 100644 (file)
@@ -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.