Skip to content

bpo-33904: IDLE: In rstrip, rename class RstripExtension as Rstrip #7811

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/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -310,7 +310,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
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
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/idle_test/test_rstrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'), '')
Expand All @@ -27,7 +27,7 @@ def test_rstrip_multiple(self):
#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"
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/rstrip.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'Provides "Strip trailing whitespace" under the "Format" menu.'

class RstripExtension:
class Rstrip:

def __init__(self, editwin):
self.editwin = editwin
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDLE: In rstrip, rename class RstripExtension as Rstrip