Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4cc00fb5
Commit
4cc00fb5
authored
Jun 11, 2006
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace normalization.
parent
92a379ec
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
49 deletions
+49
-49
Lib/ctypes/test/test_anon.py
Lib/ctypes/test/test_anon.py
+1
-1
Lib/ctypes/test/test_varsize_struct.py
Lib/ctypes/test/test_varsize_struct.py
+1
-1
Lib/idlelib/Bindings.py
Lib/idlelib/Bindings.py
+1
-1
Lib/idlelib/PyShell.py
Lib/idlelib/PyShell.py
+2
-2
Lib/idlelib/configHandler.py
Lib/idlelib/configHandler.py
+1
-1
Lib/idlelib/macosxSupport.py
Lib/idlelib/macosxSupport.py
+36
-36
Lib/optparse.py
Lib/optparse.py
+2
-2
Lib/test/test_textwrap.py
Lib/test/test_textwrap.py
+1
-1
Lib/textwrap.py
Lib/textwrap.py
+4
-4
No files found.
Lib/ctypes/test/test_anon.py
View file @
4cc00fb5
...
...
@@ -49,7 +49,7 @@ class AnonTest(unittest.TestCase):
(
"_"
,
ANON_U
),
(
"y"
,
c_int
)]
_anonymous_
=
[
"_"
]
self
.
failUnlessEqual
(
Y
.
x
.
offset
,
0
)
self
.
failUnlessEqual
(
Y
.
a
.
offset
,
sizeof
(
c_int
))
self
.
failUnlessEqual
(
Y
.
b
.
offset
,
sizeof
(
c_int
))
...
...
Lib/ctypes/test/test_varsize_struct.py
View file @
4cc00fb5
...
...
@@ -110,6 +110,6 @@ class VarSizeTest(unittest.TestCase):
array
[:
5
]
=
[
10
,
11
,
12
,
13
,
14
]
self
.
failUnlessEqual
(
array
[:],
[
10
,
11
,
12
,
13
,
14
,
25
,
26
,
27
,
28
,
29
,
0
,
0
,
0
,
0
,
0
])
self
.
failUnlessEqual
(
varsize_array
[
0
:
10
],
[
10
,
11
,
12
,
13
,
14
,
25
,
26
,
27
,
28
,
29
])
if
__name__
==
"__main__"
:
unittest
.
main
()
Lib/idlelib/Bindings.py
View file @
4cc00fb5
...
...
@@ -94,7 +94,7 @@ if sys.platform == 'darwin' and '.app' in sys.executable:
del
menudefs
[
0
][
1
][
-
3
:]
menudefs
[
0
][
1
].
insert
(
6
,
closeItem
)
# Remove the 'About' entry from the help menu, it is in the application
# Remove the 'About' entry from the help menu, it is in the application
# menu
del
menudefs
[
-
1
][
1
][
0
:
2
]
...
...
Lib/idlelib/PyShell.py
View file @
4cc00fb5
...
...
@@ -1396,8 +1396,8 @@ def main():
if
macosxSupport
.
runningAsOSXApp
()
and
flist
.
dict
:
# On OSX: when the user has double-clicked on a file that causes
# IDLE to be launched the shell window will open just in front of
# the file she wants to see. Lower the interpreter window when
# IDLE to be launched the shell window will open just in front of
# the file she wants to see. Lower the interpreter window when
# there are open files.
shell
.
top
.
lower
()
...
...
Lib/idlelib/configHandler.py
View file @
4cc00fb5
...
...
@@ -500,7 +500,7 @@ class IdleConf:
if
macosxSupport
.
runningAsOSXApp
():
# We're using AquaTk, replace all keybingings that use the
# Alt key by ones that use the Option key because the former
# Alt key by ones that use the Option key because the former
# don't work reliably.
for
k
,
v
in
result
.
items
():
v2
=
[
x
.
replace
(
'<Alt-'
,
'<Option-'
)
for
x
in
v
]
...
...
Lib/idlelib/macosxSupport.py
View file @
4cc00fb5
"""
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import
sys
def
runningAsOSXApp
():
""" Returns True iff running from the IDLE.app bundle on OSX """
return
(
sys
.
platform
==
'darwin'
and
'IDLE.app'
in
sys
.
argv
[
0
])
def
addOpenEventSupport
(
root
,
flist
):
"""
This ensures that the application will respont to open AppleEvents, which
makes is feaseable to use IDLE as the default application for python files.
"""
def
doOpenFile
(
*
args
):
for
fn
in
args
:
flist
.
open
(
fn
)
# The command below is a hook in aquatk that is called whenever the app
# receives a file open event. The callback can have multiple arguments,
# one for every file that should be opened.
root
.
createcommand
(
"::tk::mac::OpenDocument"
,
doOpenFile
)
def
hideTkConsole
(
root
):
root
.
tk
.
call
(
'console'
,
'hide'
)
def
setupApp
(
root
,
flist
):
"""
Perform setup for the OSX application bundle.
"""
if
not
runningAsOSXApp
():
return
hideTkConsole
(
root
)
addOpenEventSupport
(
root
,
flist
)
"""
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import
sys
def
runningAsOSXApp
():
""" Returns True iff running from the IDLE.app bundle on OSX """
return
(
sys
.
platform
==
'darwin'
and
'IDLE.app'
in
sys
.
argv
[
0
])
def
addOpenEventSupport
(
root
,
flist
):
"""
This ensures that the application will respont to open AppleEvents, which
makes is feaseable to use IDLE as the default application for python files.
"""
def
doOpenFile
(
*
args
):
for
fn
in
args
:
flist
.
open
(
fn
)
# The command below is a hook in aquatk that is called whenever the app
# receives a file open event. The callback can have multiple arguments,
# one for every file that should be opened.
root
.
createcommand
(
"::tk::mac::OpenDocument"
,
doOpenFile
)
def
hideTkConsole
(
root
):
root
.
tk
.
call
(
'console'
,
'hide'
)
def
setupApp
(
root
,
flist
):
"""
Perform setup for the OSX application bundle.
"""
if
not
runningAsOSXApp
():
return
hideTkConsole
(
root
)
addOpenEventSupport
(
root
,
flist
)
Lib/optparse.py
View file @
4cc00fb5
...
...
@@ -256,7 +256,7 @@ class HelpFormatter:
text_width
,
initial_indent
=
indent
,
subsequent_indent
=
indent
)
def
format_description
(
self
,
description
):
if
description
:
return
self
.
_format_text
(
description
)
+
"
\
n
"
...
...
@@ -1214,7 +1214,7 @@ class OptionParser (OptionContainer):
"""
Declare that you are done with this OptionParser. This cleans up
reference cycles so the OptionParser (and all objects referenced by
it) can be garbage-collected promptly. After calling destroy(), the
it) can be garbage-collected promptly. After calling destroy(), the
OptionParser is unusable.
"""
OptionContainer
.
destroy
(
self
)
...
...
Lib/test/test_textwrap.py
View file @
4cc00fb5
...
...
@@ -552,7 +552,7 @@ def foo():
text
=
"
\
t
hello there
\
n
\
t
how are you?"
self
.
assertEquals
(
expect
,
dedent
(
text
))
text
=
"
\
t
hello there
\
n
\
t
how are you?"
expect
=
"hello there
\
n
how are you?"
self
.
assertEquals
(
expect
,
dedent
(
text
))
...
...
Lib/textwrap.py
View file @
4cc00fb5
...
...
@@ -344,13 +344,13 @@ def dedent(text):
# Current line more deeply indented than previous winner:
# no change (previous winner is still on top).
elif indent.startswith(margin):
pass
elif indent.startswith(margin):
pass
# Current line consistent with and no deeper than previous winner:
# it's the new winner.
elif margin.startswith(indent):
margin = indent
elif margin.startswith(indent):
margin = indent
# Current line and previous winner have no common whitespace:
# there is no margin.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment