Skip to content

Commit

Permalink
bpo-31462: Remove trailing whitespaces. (python#3564)
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka authored Sep 14, 2017
1 parent 312ffea commit 13ad3b7
Show file tree
Hide file tree
Showing 21 changed files with 62 additions and 62 deletions.
18 changes: 9 additions & 9 deletions Include/pyatomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#endif


#if defined(_MSC_VER)
#if defined(_MSC_VER)
#include <intrin.h>
#include <immintrin.h>
#endif
Expand Down Expand Up @@ -223,7 +223,7 @@ _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order)
result; \
})

#elif defined(_MSC_VER)
#elif defined(_MSC_VER)
/* _Interlocked* functions provide a full memory barrier and are therefore
enough for acq_rel and seq_cst. If the HLE variants aren't available
in hardware they will fall back to a full memory barrier as well.
Expand All @@ -249,7 +249,7 @@ typedef struct _Py_atomic_int {
} _Py_atomic_int;


#if defined(_M_X64)
#if defined(_M_X64)
#define _Py_atomic_store_64bit(ATOMIC_VAL, NEW_VAL, ORDER) \
switch (ORDER) { \
case _Py_memory_order_acquire: \
Expand Down Expand Up @@ -312,7 +312,7 @@ inline intptr_t _Py_atomic_load_64bit(volatile uintptr_t* value, int order) {
break;
}
}
return old;
return old;
}

#else
Expand Down Expand Up @@ -347,7 +347,7 @@ inline int _Py_atomic_load_32bit(volatile int* value, int order) {
break;
}
}
return old;
return old;
}

#define _Py_atomic_store_explicit(ATOMIC_VAL, NEW_VAL, ORDER) \
Expand Down Expand Up @@ -379,7 +379,7 @@ typedef struct _Py_atomic_int {
} _Py_atomic_int;


#if defined(_M_ARM64)
#if defined(_M_ARM64)
#define _Py_atomic_store_64bit(ATOMIC_VAL, NEW_VAL, ORDER) \
switch (ORDER) { \
case _Py_memory_order_acquire: \
Expand Down Expand Up @@ -442,7 +442,7 @@ inline intptr_t _Py_atomic_load_64bit(volatile uintptr_t* value, int order) {
break;
}
}
return old;
return old;
}

#else
Expand Down Expand Up @@ -477,13 +477,13 @@ inline int _Py_atomic_load_32bit(volatile int* value, int order) {
break;
}
}
return old;
return old;
}

#define _Py_atomic_store_explicit(ATOMIC_VAL, NEW_VAL, ORDER) \
if (sizeof(*ATOMIC_VAL._value) == 8) { \
_Py_atomic_store_64bit(ATOMIC_VAL._value, NEW_VAL, ORDER) } else { \
_Py_atomic_store_32bit(ATOMIC_VAL._value, NEW_VAL, ORDER) }
_Py_atomic_store_32bit(ATOMIC_VAL._value, NEW_VAL, ORDER) }

#define _Py_atomic_load_explicit(ATOMIC_VAL, ORDER) \
( \
Expand Down
4 changes: 2 additions & 2 deletions Lib/http/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ def send_head(self):
fs.st_mtime, datetime.timezone.utc)
# remove microseconds, like in If-Modified-Since
last_modif = last_modif.replace(microsecond=0)

if last_modif <= ims:
self.send_response(HTTPStatus.NOT_MODIFIED)
self.end_headers()
Expand All @@ -727,7 +727,7 @@ def send_head(self):
self.send_response(HTTPStatus.OK)
self.send_header("Content-type", ctype)
self.send_header("Content-Length", str(fs[6]))
self.send_header("Last-Modified",
self.send_header("Last-Modified",
self.date_time_string(fs.st_mtime))
self.end_headers()
return f
Expand Down
56 changes: 28 additions & 28 deletions Lib/idlelib/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ IDLEfork ChangeLog

* INSTALLATION, setup.py: INSTALLATION: Remove the coexist.patch
instructions

**************** setup.py:

Remove the idles script, add some words on IDLE Fork to the
long_description, and clean up some line spacing.

Expand All @@ -42,30 +42,30 @@ IDLEfork ChangeLog
* PyShell.py, idle, idles: Implement idle command interface as
suggested by GvR [idle-dev] 16 July **************** PyShell: Added
functionality:

usage: idle.py [-c command] [-d] [-i] [-r script] [-s] [-t title]
[arg] ...

idle file(s) (without options) edit the file(s)

-c cmd run the command in a shell -d enable the
debugger -i open an interactive shell -i file(s) open a
shell and also an editor window for each file -r script run a file
as a script in a shell -s run $IDLESTARTUP or
$PYTHONSTARTUP before anything else -t title set title of shell
window

Remaining arguments are applied to the command (-c) or script (-r).

****************** idles: Removed the idles script, not needed

****************** idle: Removed the IdleConf references, not
required anymore

2001-07-16 17:08 kbk

* INSTALLATION, coexist.patch: Added installation instructions.

Added a patch which modifies idlefork so that it can co-exist with
"official" IDLE in the site-packages directory. This patch is not
necessary if only idlefork IDLE is installed. See INSTALLATION for
Expand All @@ -74,7 +74,7 @@ IDLEfork ChangeLog
2001-07-16 15:50 kbk

* idles: Add a script "idles" which opens a Python Shell window.

The default behaviour of idlefork idle is to open an editor window
instead of a shell. Complex expressions may be run in a fresh
environment by selecting "run". There are times, however, when a
Expand All @@ -90,7 +90,7 @@ IDLEfork ChangeLog

* PyShell.py, setup.py: Add a script "idles" which opens a Python
Shell window.

The default behaviour of idlefork idle is to open an editor window
instead of a shell. Complex expressions may be run in a fresh
environment by selecting "run". There are times, however, when a
Expand All @@ -110,21 +110,21 @@ IDLEfork ChangeLog

* setup.py: Installing Idle to site-packages via Distutils does not
copy the Idle help.txt file.

Ref SF Python Patch 422471

2001-07-14 15:26 kbk

* keydefs.py: py-cvs-2001_07_13 (Rev 1.3) merge

"Make copy, cut and paste events case insensitive. Reported by
Patrick K. O'Brien on idle-dev. (Should other bindings follow
suit?)" --GvR

2001-07-14 15:21 kbk

* idle.py: py-cvs-2001_07_13 (Rev 1.4) merge

"Move the action of loading the configuration to the IdleConf
module rather than the idle.py script. This has advantages and
disadvantages; the biggest advantage being that we can more easily
Expand All @@ -133,21 +133,21 @@ IDLEfork ChangeLog
2001-07-14 15:18 kbk

* extend.txt: py-cvs-2001_07_13 (Rev 1.4) merge

"Quick update to the extension mechanism (extend.py is gone, long
live config.txt)" --GvR

2001-07-14 15:15 kbk

* StackViewer.py: py-cvs-2001_07_13 (Rev 1.16) merge

"Refactored, with some future plans in mind. This now uses the new
gotofileline() method defined in FileList.py" --GvR

2001-07-14 15:10 kbk

* PyShell.py: py-cvs-2001_07_13 (Rev 1.34) merge

"Amazing. A very subtle change in policy in descr-branch actually
found a bug here. Here's the deal: Class PyShell derives from
class OutputWindow. Method PyShell.close() wants to invoke its
Expand All @@ -166,19 +166,19 @@ IDLEfork ChangeLog
2001-07-14 14:59 kbk

* PyParse.py: py-cvs-2001_07_13 (Rel 1.9) merge

"Taught IDLE's autoident parser that "yield" is a keyword that
begins a stmt. Along w/ the preceding change to keyword.py, making
all this work w/ a future-stmt just looks harder and harder."
--tim_one

(From Rel 1.8: "Hack to make this still work with Python 1.5.2.
;-( " --fdrake)

2001-07-14 14:51 kbk

* IdleConf.py: py-cvs-2001_07_13 (Rel 1.7) merge

"Move the action of loading the configuration to the IdleConf
module rather than the idle.py script. This has advantages and
disadvantages; the biggest advantage being that we can more easily
Expand All @@ -187,11 +187,11 @@ IDLEfork ChangeLog
2001-07-14 14:45 kbk

* FileList.py: py-cvs-2000_07_13 (Rev 1.9) merge

"Delete goodname() method, which is unused. Add gotofileline(), a
convenience method which I intend to use in a variant. Rename
test() to _test()." --GvR

This was an interesting merge. The join completely missed removing
goodname(), which was adjacent, but outside of, a small conflict.
I only caught it by comparing the 1.1.3.2/1.1.3.3 diff. CVS ain't
Expand Down Expand Up @@ -245,13 +245,13 @@ IDLEfork ChangeLog
2001-07-14 10:13 kbk

* PyShell.py: cvs-py-rel2_1 (Rev 1.29 - 1.33) merge

Merged the following py-cvs revs without conflict: 1.29 Reduce
copyright text output at startup 1.30 Delay setting sys.args until
Tkinter is fully initialized 1.31 Whitespace normalization 1.32
Turn syntax warning into error when interactive 1.33 Fix warning
initialization bug

Note that module is extensively modified wrt py-cvs

2001-07-14 06:33 kbk
Expand Down Expand Up @@ -317,14 +317,14 @@ IDLEfork ChangeLog
2001-07-13 13:35 kbk

* EditorWindow.py: py-cvs-rel2_1 (Rev 1.33 - 1.37) merge

VP IDLE version depended on VP's ExecBinding.py and spawn.py to get
the path to the Windows Doc directory (relative to python.exe).
Removed this conflicting code in favor of py-cvs updates which on
Windows use a hard coded path relative to the location of this
module. py-cvs updates include support for webbrowser.py. Module
still has BrowserControl.py for 1.5.2 support.

At this point, the differences wrt py-cvs relate to menu
functionality.

Expand Down Expand Up @@ -1194,7 +1194,7 @@ Wed Mar 10 05:18:02 1999 Guido van Rossum <[email protected]>
======================================================================
Python release 1.5.2b2, IDLE version 0.3
======================================================================

Wed Feb 17 22:47:41 1999 Guido van Rossum <[email protected]>

* NEWS.txt: News in 0.3.
Expand Down Expand Up @@ -1330,7 +1330,7 @@ Sat Jan 9 22:01:33 1999 Guido van Rossum <[email protected]>
======================================================================
Python release 1.5.2b1, IDLE version 0.2
======================================================================

Fri Jan 8 17:26:02 1999 Guido van Rossum <[email protected]>

* README.txt, NEWS.txt: What's new in this release.
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Window
<open windows> # windows

Help
About IDLE # eEW.about_dialog, help_about.AboutDialog
About IDLE # eEW.about_dialog, help_about.AboutDialog
---
IDLE Help # eEW.help_dialog, helpshow_idlehelp
Python Doc # eEW.python_docs
Expand All @@ -230,7 +230,7 @@ Help
<No menu>
Center Insert # eEW.center_insert_event


CODE STYLE -- Generally PEP 8.

import
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ python -m idlelib.idle_test.htest
5. Test Coverage

Install the coverage package into your Python 3.6 site-packages
directory. (Its exact location depends on the OS).
directory. (Its exact location depends on the OS).
> python3 -m pip install coverage
(On Windows, replace 'python3 with 'py -3.6' or perhaps just 'python'.)

Expand Down
4 changes: 2 additions & 2 deletions Lib/test/dtracedata/call_stack.d
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python$target:::function-entry
/self->trace/
{
printf("%d\t%*s:", timestamp, 15, probename);
printf("%*s", self->indent, "");
printf("%*s", self->indent, "");
printf("%s:%s:%d\n", basename(copyinstr(arg0)), copyinstr(arg1), arg2);
self->indent++;
}
Expand All @@ -20,7 +20,7 @@ python$target:::function-return
{
self->indent--;
printf("%d\t%*s:", timestamp, 15, probename);
printf("%*s", self->indent, "");
printf("%*s", self->indent, "");
printf("%s:%s:%d\n", basename(copyinstr(arg0)), copyinstr(arg1), arg2);
}

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,7 @@ def test_staticmethod(*args): # NOQA
((('args', ..., ..., 'var_positional'),), ...))
self.assertEqual(self.signature(A.f3),
((('args', ..., ..., 'var_positional'),), ...))
self.assertEqual(self.signature(A.f4),
self.assertEqual(self.signature(A.f4),
((('args', ..., ..., 'var_positional'),
('kwargs', ..., ..., 'var_keyword')), ...))
@cpython_only
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: latin1 -*-
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
# at the start of it. Make sure this is preserved if any changes
# are made! Also note that the coding cookie above conflicts with
# the presence of a utf-8 BOM signature -- this is intended.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
# at the start of it. Make sure this is preserved if any changes
# are made!

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
# at the start of it. Make sure this is preserved if any changes
# are made!

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/tokenize_tests.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Tests for the 'tokenize' module.
# Large bits stolen from test_grammar.py.
# Large bits stolen from test_grammar.py.

# Comments
"#"
Expand Down
2 changes: 1 addition & 1 deletion Lib/venv/scripts/posix/activate.fish
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
set -l old_status $status

# Prompt override?
if test -n "__VENV_PROMPT__"
if test -n "__VENV_PROMPT__"
printf "%s%s" "__VENV_PROMPT__" (set_color normal)
else
# ...Otherwise, prepend env
Expand Down
Loading

0 comments on commit 13ad3b7

Please sign in to comment.