[Python-checkins] bpo-44854: Remove trailing whitespaces (GH-27689)

serhiy-storchaka webhook-mailer at python.org
Mon Aug 9 14:33:03 EDT 2021


https://github.com/python/cpython/commit/058fb35b57ca8c5063d16ec818e668b3babfea65
commit: 058fb35b57ca8c5063d16ec818e668b3babfea65
branch: main
author: Serhiy Storchaka <storchaka at gmail.com>
committer: serhiy-storchaka <storchaka at gmail.com>
date: 2021-08-09T21:32:54+03:00
summary:

bpo-44854: Remove trailing whitespaces (GH-27689)

files:
M .github/SECURITY.md
M .github/problem-matchers/sphinx.json
M Doc/tools/templates/search.html
M Modules/_bisectmodule.c
M Modules/_ctypes/_ctypes_test.c
M Modules/_json.c
M Modules/termios.c
M Objects/exceptions.c
M Objects/genericaliasobject.c
M Parser/tokenizer.h
M Python/adaptive.md
M Tools/c-analyzer/c_parser/_state_machine.py
M Tools/c-analyzer/c_parser/preprocessor/__init__.py

diff --git a/.github/SECURITY.md b/.github/SECURITY.md
index 82ae4ca8c30977..2aebc5a0bf717f 100644
--- a/.github/SECURITY.md
+++ b/.github/SECURITY.md
@@ -14,4 +14,4 @@ official website](https://www.python.org/dev/security/) for
 instructions on how to report a security-related problem to
 the Python team responsibly.
 
-To reach the response team, email `security at python dot org`. 
+To reach the response team, email `security at python dot org`.
diff --git a/.github/problem-matchers/sphinx.json b/.github/problem-matchers/sphinx.json
index 228415f5b7b03f..09848608a7b034 100644
--- a/.github/problem-matchers/sphinx.json
+++ b/.github/problem-matchers/sphinx.json
@@ -34,7 +34,7 @@
                     "line": 2,
                     "message": 3
                 }
-            ]           
+            ]
         }
     ]
 }
\ No newline at end of file
diff --git a/Doc/tools/templates/search.html b/Doc/tools/templates/search.html
index cf20c2e1d4ff83..f2ac2ea0f09873 100644
--- a/Doc/tools/templates/search.html
+++ b/Doc/tools/templates/search.html
@@ -6,7 +6,7 @@
 
         jQuery(function() {
             $.getJSON("_static/glossary.json", function(glossary) {
-                var RESULT_TEMPLATE = '<div style="display: none" class="admonition seealso" id="glossary-result">' + 
+                var RESULT_TEMPLATE = '<div style="display: none" class="admonition seealso" id="glossary-result">' +
                                       '  <p class="topic-title">' +
                                       '    <a class="glossary-title" href="#"></a>' +
                                       '  </p>' +
@@ -20,7 +20,7 @@
                     var glossary_item = glossary[search_param];
                     if (glossary_item) {
                         var resultDiv = $("#glossary-result");
-                        
+
                         // set up the title text with a link to the glossary page
                         resultDiv.find(".glossary-title").text('Glossary: ' + glossary_item.title);
                         var link_target = search_param.replace(/ /g, '-');
diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c
index aa63b685609cc0..26c4b9bfb26b22 100644
--- a/Modules/_bisectmodule.c
+++ b/Modules/_bisectmodule.c
@@ -240,7 +240,7 @@ _bisect_insort_left_impl(PyObject *module, PyObject *a, PyObject *x,
 {
     PyObject *result, *key_x;
     Py_ssize_t index;
-    
+
     if (key == Py_None) {
         index = internal_bisect_left(a, x, lo, hi, key);
     } else {
diff --git a/Modules/_ctypes/_ctypes_test.c b/Modules/_ctypes/_ctypes_test.c
index 1ccad8e0e3d64d..a33d15de9c0d41 100644
--- a/Modules/_ctypes/_ctypes_test.c
+++ b/Modules/_ctypes/_ctypes_test.c
@@ -1034,7 +1034,7 @@ EXPORT (HRESULT) KeepObject(IUnknown *punk)
 
 static struct PyModuleDef_Slot _ctypes_test_slots[] = {
     {0, NULL}
-}; 
+};
 
 static struct PyModuleDef _ctypes_testmodule = {
     PyModuleDef_HEAD_INIT,
diff --git a/Modules/_json.c b/Modules/_json.c
index e10f83c96c565f..6f68c1f7f9b715 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -321,7 +321,7 @@ raise_errmsg(const char *msg, PyObject *s, Py_ssize_t end)
     if (decoder == NULL) {
         return;
     }
-    
+
     _Py_IDENTIFIER(JSONDecodeError);
     PyObject *JSONDecodeError = _PyObject_GetAttrId(decoder, &PyId_JSONDecodeError);
     Py_DECREF(decoder);
diff --git a/Modules/termios.c b/Modules/termios.c
index a6649598ec1710..fdfe589eb80c1a 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -1004,7 +1004,7 @@ static void termiosmodule_free(void *m) {
     termiosmodule_clear((PyObject *)m);
 }
 
-static int 
+static int
 termios_exec(PyObject *mod)
 {
     struct constant *constant = termios_constants;
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 76772fbed214d7..c6a7aa4aeccf04 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -1503,7 +1503,7 @@ SyntaxError_init(PySyntaxErrorObject *self, PyObject *args, PyObject *kwds)
                               &self->end_lineno, &self->end_offset)) {
             Py_DECREF(info);
             return -1;
-        } 
+        }
 
         Py_INCREF(self->filename);
         Py_INCREF(self->lineno);
diff --git a/Objects/genericaliasobject.c b/Objects/genericaliasobject.c
index dda53cb5338645..38b68e410c443c 100644
--- a/Objects/genericaliasobject.c
+++ b/Objects/genericaliasobject.c
@@ -576,7 +576,7 @@ static PyGetSetDef ga_properties[] = {
 };
 
 /* A helper function to create GenericAlias' args tuple and set its attributes.
- * Returns 1 on success, 0 on failure. 
+ * Returns 1 on success, 0 on failure.
  */
 static inline int
 setup_ga(gaobject *alias, PyObject *origin, PyObject *args) {
diff --git a/Parser/tokenizer.h b/Parser/tokenizer.h
index ff563d57fa8b15..a40f7d9687b440 100644
--- a/Parser/tokenizer.h
+++ b/Parser/tokenizer.h
@@ -83,7 +83,7 @@ struct tok_state {
     int async_def_nl;     /* =1 if the outermost 'async def' had at least one
                              NEWLINE token after it. */
     /* How to proceed when asked for a new token in interactive mode */
-    enum interactive_underflow_t interactive_underflow; 
+    enum interactive_underflow_t interactive_underflow;
 };
 
 extern struct tok_state *PyTokenizer_FromString(const char *, int);
diff --git a/Python/adaptive.md b/Python/adaptive.md
index 66b80a17464bfb..81880ce8cf2426 100644
--- a/Python/adaptive.md
+++ b/Python/adaptive.md
@@ -12,7 +12,7 @@ A family of instructions has the following fundamental properties:
 * It has a single adaptive instruction that records an execution count and,
   at regular intervals, attempts to specialize itself. If not specializing,
   it executes the non-adaptive instruction.
-* It has at least one specialized form of the instruction that is tailored 
+* It has at least one specialized form of the instruction that is tailored
   for a particular value or set of values at runtime.
 * All members of the family have access to the same number of cache entries.
   Individual family members do not need to use all of the entries.
@@ -80,7 +80,7 @@ requiring judgement and experimentation to design the family of instructions.
 
 Before choosing how to specialize an instruction, it is important to gather
 some data. What are the patterns of usage of the base instruction?
-Data can best be gathered by instrumenting the interpreter. Since a 
+Data can best be gathered by instrumenting the interpreter. Since a
 specialization function and adaptive instruction are going to be required,
 instrumentation can most easily be added in the specialization function.
 
diff --git a/Tools/c-analyzer/c_parser/_state_machine.py b/Tools/c-analyzer/c_parser/_state_machine.py
index b505b4e3e47240..53cbb13e7c4edb 100644
--- a/Tools/c-analyzer/c_parser/_state_machine.py
+++ b/Tools/c-analyzer/c_parser/_state_machine.py
@@ -23,7 +23,7 @@ def parse(srclines):
     if isinstance(srclines, str):  # a filename
         raise NotImplementedError
 
-    
+
 
 # This only handles at most 10 nested levels.
 #MATCHED_PARENS = textwrap.dedent(rf'''
diff --git a/Tools/c-analyzer/c_parser/preprocessor/__init__.py b/Tools/c-analyzer/c_parser/preprocessor/__init__.py
index f206f694db5a88..8da4d8cadf7d0e 100644
--- a/Tools/c-analyzer/c_parser/preprocessor/__init__.py
+++ b/Tools/c-analyzer/c_parser/preprocessor/__init__.py
@@ -91,7 +91,7 @@ def get_file_preprocessor(filename):
             macros = list(_resolve_file_values(filename, file_macros))
         if file_incldirs:
             incldirs = [v for v, in _resolve_file_values(filename, file_incldirs)]
-    
+
         def preprocess(**kwargs):
             if file_macros and 'macros' not in kwargs:
                 kwargs['macros'] = macros



More information about the Python-checkins mailing list