diff options
author | Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <srinivasreddy@users.noreply.github.com> | 2018-06-20 07:42:13 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2018-06-20 07:42:13 (GMT) |
commit | 9bb92235f6272b28d59fcbd04f101fdc6b1bbc50 (patch) | |
tree | 4083bea750ae634e9c3093c2f5d0f00632a4ddf2 /Lib | |
parent | 9af1836664d241fec6e62955ffaa559b3a2eaf1b (diff) | |
download | cpython-9bb92235f6272b28d59fcbd04f101fdc6b1bbc50.zip cpython-9bb92235f6272b28d59fcbd04f101fdc6b1bbc50.tar.gz cpython-9bb92235f6272b28d59fcbd04f101fdc6b1bbc50.tar.bz2 |
bpo-33904: In IDLE's rstrip, rename class RstripExtension as Rstrip (GH-7811)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/editor.py | 4 | ||||
-rw-r--r-- | Lib/idlelib/idle_test/test_rstrip.py | 4 | ||||
-rw-r--r-- | Lib/idlelib/rstrip.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index f5a0918..b463165 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -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 diff --git a/Lib/idlelib/idle_test/test_rstrip.py b/Lib/idlelib/idle_test/test_rstrip.py index 9ef1320..2bc7c6f 100644 --- a/Lib/idlelib/idle_test/test_rstrip.py +++ b/Lib/idlelib/idle_test/test_rstrip.py @@ -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" diff --git a/Lib/idlelib/rstrip.py b/Lib/idlelib/rstrip.py index b845d80..f93b5e8 100644 --- a/Lib/idlelib/rstrip.py +++ b/Lib/idlelib/rstrip.py @@ -1,6 +1,6 @@ 'Provides "Strip trailing whitespace" under the "Format" menu.' -class RstripExtension: +class Rstrip: def __init__(self, editwin): self.editwin = editwin |