]> granicus.if.org Git - python/commitdiff
bpo-33904: In IDLE's rstrip, rename class RstripExtension as Rstrip (GH-7811)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 20 Jun 2018 15:56:22 +0000 (08:56 -0700)
committerGitHub <noreply@github.com>
Wed, 20 Jun 2018 15:56:22 +0000 (08:56 -0700)
(cherry picked from commit 9bb92235f6272b28d59fcbd04f101fdc6b1bbc50)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <srinivasreddy@users.noreply.github.com>
Lib/idlelib/editor.py
Lib/idlelib/idle_test/test_rstrip.py
Lib/idlelib/rstrip.py
Misc/NEWS.d/next/IDLE/2018-06-20-12-40-54.bpo-33904.qm0eCu.rst [new file with mode: 0644]

index f5a091860ec618c0f5322fb3aea1cc1b051dff59..b46316569d05b5c08d2981a2c9776c7919c35dad 100644 (file)
@@ -58,7 +58,7 @@ class EditorWindow(object):
     from idlelib.codecontext import CodeContext
     from idlelib.paragraph import FormatParagraph
     from idlelib.parenmatch import ParenMatch
-    from idlelib.rstrip import RstripExtension
+    from idlelib.rstrip import Rstrip
     from idlelib.zoomheight import ZoomHeight
 
     filesystemencoding = sys.getfilesystemencoding()  # for file names
@@ -310,7 +310,7 @@ class EditorWindow(object):
         scriptbinding = ScriptBinding(self)
         text.bind("<<check-module>>", scriptbinding.check_module_event)
         text.bind("<<run-module>>", scriptbinding.run_module_event)
-        text.bind("<<do-rstrip>>", self.RstripExtension(self).do_rstrip)
+        text.bind("<<do-rstrip>>", self.Rstrip(self).do_rstrip)
         ctip = self.Calltip(self)
         text.bind("<<try-open-calltip>>", ctip.try_open_calltip_event)
         #refresh-calltip must come after paren-closed to work right
index 9ef1320eefbad5975e6e48b186454086d0c0285d..2bc7c6f035e96b0c46374ce726896a1fcfd1c081 100644 (file)
@@ -9,7 +9,7 @@ class rstripTest(unittest.TestCase):
     def test_rstrip_line(self):
         editor = Editor()
         text = editor.text
-        do_rstrip = rstrip.RstripExtension(editor).do_rstrip
+        do_rstrip = rstrip.Rstrip(editor).do_rstrip
 
         do_rstrip()
         self.assertEqual(text.get('1.0', 'insert'), '')
@@ -27,7 +27,7 @@ class rstripTest(unittest.TestCase):
         #from tkinter import Tk
         #editor = Editor(root=Tk())
         text = editor.text
-        do_rstrip = rstrip.RstripExtension(editor).do_rstrip
+        do_rstrip = rstrip.Rstrip(editor).do_rstrip
 
         original = (
             "Line with an ending tab    \n"
index b845d809d315ac431390d385ceb1a1d733b9e78a..f93b5e8fc20021182e0da2ca796f447e66f12b82 100644 (file)
@@ -1,6 +1,6 @@
 'Provides "Strip trailing whitespace" under the "Format" menu.'
 
-class RstripExtension:
+class Rstrip:
 
     def __init__(self, editwin):
         self.editwin = editwin
diff --git a/Misc/NEWS.d/next/IDLE/2018-06-20-12-40-54.bpo-33904.qm0eCu.rst b/Misc/NEWS.d/next/IDLE/2018-06-20-12-40-54.bpo-33904.qm0eCu.rst
new file mode 100644 (file)
index 0000000..efed237
--- /dev/null
@@ -0,0 +1 @@
+IDLE: In rstrip, rename class RstripExtension as Rstrip