Skip to content

Commit 6655e4b

Browse files
committed
Whitespace Normalization
1 parent 9532298 commit 6655e4b

23 files changed

Lines changed: 306 additions & 322 deletions

Lib/idlelib/CallTipWindow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def showtip(self, text):
3737
# This command is only needed and available on Tk >= 8.4.0 for OSX
3838
# Without it, call tips intrude on the typing process by grabbing
3939
# the focus.
40-
tw.tk.call("::tk::unsupported::MacWindowStyle", "style", tw._w,
40+
tw.tk.call("::tk::unsupported::MacWindowStyle", "style", tw._w,
4141
"help", "noActivates")
4242
except TclError:
4343
pass

Lib/idlelib/CallTips.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ def get_name_at_cursor(self):
8181
while i and str[i-1] in idchars:
8282
i -= 1
8383
return str[i:]
84-
84+
8585
def fetch_tip(self, name):
86-
"""Return the argument list and docstring of a function or class
87-
86+
"""Return the argument list and docstring of a function or class
87+
8888
If there is a Python subprocess, get the calltip there. Otherwise,
8989
either fetch_tip() is running in the subprocess itself or it was called
9090
in an IDLE EditorWindow before any script had been run.
@@ -93,7 +93,7 @@ def fetch_tip(self, name):
9393
two unrelated modules are being edited some calltips in the current
9494
module may be inoperative if the module was not the last to run.
9595
96-
"""
96+
"""
9797
try:
9898
rpcclt = self.editwin.flist.pyshell.interp.rpcclt
9999
except:
@@ -211,7 +211,7 @@ def test(tests):
211211
print "%d of %d tests failed" % (len(failed), len(tests))
212212

213213
tc = TC()
214-
tests = (t1, t2, t3, t4, t5, t6,
214+
tests = (t1, t2, t3, t4, t5, t6,
215215
TC, tc.t1, tc.t2, tc.t3, tc.t4, tc.t5, tc.t6)
216216

217217
test(tests)

Lib/idlelib/ColorDelegator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def config_colors(self):
5252
if cnf:
5353
apply(self.tag_configure, (tag,), cnf)
5454
self.tag_raise('sel')
55-
55+
5656
def LoadTagDefs(self):
5757
theme = idleConf.GetOption('main','Theme','name')
5858
self.tagdefs = {
@@ -67,7 +67,7 @@ def LoadTagDefs(self):
6767
# The following is used by ReplaceDialog:
6868
"hit": idleConf.GetHighlight(theme, "hit"),
6969
}
70-
70+
7171
if DEBUG: print 'tagdefs',tagdefs
7272

7373
def insert(self, index, chars, tags=None):

Lib/idlelib/Debugger.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ def __init__(self, gui):
1515
def user_line(self, frame):
1616

1717
co_filename = frame.f_code.co_filename
18-
co_name = frame.f_code.co_name
18+
co_name = frame.f_code.co_name
1919

2020
## print>>sys.__stderr__, "*function: ", frame.f_code.co_name
21-
## print>>sys.__stderr__, "*file: ", frame.f_code.co_filename
21+
## print>>sys.__stderr__, "*file: ", frame.f_code.co_filename
2222
## print>>sys.__stderr__, "*line number: ", frame.f_code.co_firstlineno
2323
## print>>sys.__stderr__, "*name: ", co_name
2424
## print>>sys.__stderr__, "*function: ", frame.f_locals.get(co_name,None)
2525

2626
try:
2727
# XXX 12 Dec 2002 CGT TO DO: Find way to get a reference to the
28-
# XXX currently running function. If the function has an
28+
# XXX currently running function. If the function has an
2929
# attribute called "DebuggerStepThrough", prevent the debugger
3030
# from stepping through Idle code. The following doesn't work
3131
# in instance methods. Hard coded some workarounds.
@@ -75,7 +75,7 @@ def __init__(self, pyshell, idb=None):
7575
self.frame = None
7676
self.make_gui()
7777
self.interacting = 0
78-
78+
7979
def run(self, *args):
8080
try:
8181
self.interacting = 1

Lib/idlelib/EditorWindow.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
111111
text.bind("<<untabify-region>>",self.untabify_region_event)
112112
text.bind("<<toggle-tabs>>",self.toggle_tabs_event)
113113
text.bind("<<change-indentwidth>>",self.change_indentwidth_event)
114-
114+
115115
if flist:
116116
flist.inversedict[self] = key
117117
if key:
@@ -186,7 +186,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
186186
if self.extensions.has_key('AutoIndent'):
187187
self.extensions['AutoIndent'].set_indentation_params(
188188
self.ispythonsource(filename))
189-
189+
190190
def set_status_bar(self):
191191
self.status_bar = self.MultiStatusBar(self.top)
192192
self.status_bar.set_label('column', 'Col: ?', side=RIGHT)
@@ -273,21 +273,21 @@ def command(text=self.text, eventname=eventname):
273273

274274
def about_dialog(self, event=None):
275275
aboutDialog.AboutDialog(self.top,'About IDLEfork')
276-
276+
277277
def config_dialog(self, event=None):
278278
configDialog.ConfigDialog(self.top,'Settings')
279-
279+
280280
def good_advice(self, event=None):
281281
tkMessageBox.showinfo('Advice', "Don't Panic!", master=self.text)
282282

283283
def view_readme(self, event=None):
284284
fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'README.txt')
285-
textView.TextViewer(self.top,'IDLEfork - README',fn)
285+
textView.TextViewer(self.top,'IDLEfork - README',fn)
286286

287287
def help_dialog(self, event=None):
288288
fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt')
289-
textView.TextViewer(self.top,'Help',fn)
290-
289+
textView.TextViewer(self.top,'Help',fn)
290+
291291
help_url = "http://www.python.org/doc/current/"
292292
if sys.platform[:3] == "win":
293293
fn = os.path.dirname(__file__)
@@ -469,7 +469,7 @@ def rmcolorizer(self):
469469
self.per.removefilter(self.color)
470470
self.color = None
471471
self.per.insertfilter(self.undo)
472-
472+
473473
def ResetColorizer(self):
474474
"Update the colour theme if it is changed"
475475
# Called from configDialog.py
@@ -478,7 +478,7 @@ def ResetColorizer(self):
478478
self.per.insertfilter(self.color)
479479

480480
def ResetFont(self):
481-
"Update the text widgets' font if it is changed"
481+
"Update the text widgets' font if it is changed"
482482
# Called from configDialog.py
483483
fontWeight='normal'
484484
if idleConf.GetOption('main','EditorWindow','font-bold',type='bool'):
@@ -535,15 +535,15 @@ def ResetExtraHelpMenu(self):
535535
self.menuExtraHelp.add_command(label=menuItem[0],
536536
command=self.__DisplayExtraHelpCallback(menuItem[1]))
537537
else: #no extra help items
538-
if hasattr(self,'menuExtraHelp'):
539-
helpMenu.delete(cascadeIndex-1)
538+
if hasattr(self,'menuExtraHelp'):
539+
helpMenu.delete(cascadeIndex-1)
540540
del(self.menuExtraHelp)
541-
541+
542542
def __DisplayExtraHelpCallback(self,helpFile):
543543
def DisplayExtraHelp(helpFile=helpFile):
544544
self.display_docs(helpFile)
545545
return DisplayExtraHelp
546-
546+
547547
def UpdateRecentFilesList(self,newFile=None):
548548
"Load or update the recent files list, and menu if required"
549549
rfList=[]
@@ -553,7 +553,7 @@ def UpdateRecentFilesList(self,newFile=None):
553553
rfList=RFfile.readlines()
554554
finally:
555555
RFfile.close()
556-
if newFile:
556+
if newFile:
557557
newFile=os.path.abspath(newFile)+'\n'
558558
if newFile in rfList:
559559
rfList.remove(newFile)
@@ -567,7 +567,7 @@ def UpdateRecentFilesList(self,newFile=None):
567567
for instance in self.top.instanceDict.keys():
568568
menu = instance.menuRecentFiles
569569
menu.delete(1,END)
570-
i = 0 ; ul = 0; ullen = len(ullist)
570+
i = 0 ; ul = 0; ullen = len(ullist)
571571
for file in rfList:
572572
fileName=file[0:-1]
573573
callback = instance.__RecentFileCallback(fileName)
@@ -577,13 +577,13 @@ def UpdateRecentFilesList(self,newFile=None):
577577
command=callback,
578578
underline=ul)
579579
i += 1
580-
580+
581581
def __CleanRecentFiles(self,rfList):
582582
origRfList=rfList[:]
583583
count=0
584584
nonFiles=[]
585585
for path in rfList:
586-
if not os.path.exists(path[0:-1]):
586+
if not os.path.exists(path[0:-1]):
587587
nonFiles.append(count)
588588
count=count+1
589589
if nonFiles:
@@ -599,12 +599,12 @@ def __CleanRecentFiles(self,rfList):
599599
finally:
600600
RFfile.close()
601601
return rfList
602-
602+
603603
def __RecentFileCallback(self,fileName):
604604
def OpenRecentFile(fileName=fileName):
605605
self.io.open(editFile=fileName)
606606
return OpenRecentFile
607-
607+
608608
def saved_change_hook(self):
609609
short = self.short_title()
610610
long = self.long_title()
@@ -672,7 +672,7 @@ def close_event(self, event):
672672
def maybesave(self):
673673
if self.io:
674674
if not self.get_saved():
675-
if self.top.state()!='normal':
675+
if self.top.state()!='normal':
676676
self.top.deiconify()
677677
self.top.lower()
678678
self.top.lift()

Lib/idlelib/IOBinding.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def __init__(self, editwin):
103103
self.save_a_copy)
104104
self.fileencoding = None
105105
self.__id_print = self.text.bind("<<print-window>>", self.print_window)
106-
106+
107107
def close(self):
108108
# Undo command bindings
109109
self.text.unbind("<<open-window-from-file>>", self.__id_open)
@@ -366,7 +366,7 @@ def encode(self, chars):
366366
"# -*- coding: %s -*- \nto your file" % enc,
367367
master = self.text)
368368
return chars
369-
369+
370370
def fixlastline(self):
371371
c = self.text.get("end-2c")
372372
if c != '\n':
@@ -403,10 +403,10 @@ def print_window(self, event):
403403
output = "Printing command: %s\n" % repr(command) + output
404404
tkMessageBox.showerror("Print status", output, master=self.text)
405405
else: #no printing for this platform
406-
message="Printing is not enabled for this platform: %s" % platform
406+
message="Printing is not enabled for this platform: %s" % platform
407407
tkMessageBox.showinfo("Print status", message, master=self.text)
408408
return "break"
409-
409+
410410
opendialog = None
411411
savedialog = None
412412

Lib/idlelib/OutputWindow.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,3 @@ def setup(self):
146146

147147
# def flush(self):
148148
# pass
149-
150-
151-
152-
153-
154-
155-

0 commit comments

Comments
 (0)