[Python-checkins] [3.10] Remove trailing spaces (GH-28709)

serhiy-storchaka webhook-mailer at python.org
Sun Oct 3 13:03:58 EDT 2021


https://github.com/python/cpython/commit/93242d7a2ad8c22f72ff84b63ed9046d32f6aa8e
commit: 93242d7a2ad8c22f72ff84b63ed9046d32f6aa8e
branch: 3.10
author: Serhiy Storchaka <storchaka at gmail.com>
committer: serhiy-storchaka <storchaka at gmail.com>
date: 2021-10-03T20:03:49+03:00
summary:

[3.10] Remove trailing spaces (GH-28709)

files:
M Include/internal/pycore_code.h
M Lib/test/test_syntax.py
M Lib/test/test_time.py
M Lib/typing.py
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 Objects/obmalloc.c
M Parser/tokenizer.h
M Python/bootstrap_hash.c
M Tools/c-analyzer/c_parser/_state_machine.py
M Tools/c-analyzer/c_parser/preprocessor/__init__.py

diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h
index f1e89d96b9ebb..8ff1863dc0015 100644
--- a/Include/internal/pycore_code.h
+++ b/Include/internal/pycore_code.h
@@ -3,7 +3,7 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
- 
+
 typedef struct {
     PyObject *ptr;  /* Cached pointer (borrowed reference) */
     uint64_t globals_ver;  /* ma_version of global dict */
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index f9deb7b3313a7..45b2785f34831 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1298,7 +1298,7 @@ def _check_error(self, code, errtext,
                 self.assertEqual(err.end_lineno, end_lineno)
             if end_offset is not None:
                 self.assertEqual(err.end_offset, end_offset)
- 
+
         else:
             self.fail("compile() did not raise SyntaxError")
 
@@ -1438,7 +1438,7 @@ def test_kwargs_last3(self):
         self._check_error("int(**{'base': 10}, *['2'])",
                           "iterable argument unpacking follows "
                           "keyword argument unpacking")
-    
+
     def test_generator_in_function_call(self):
         self._check_error("foo(x,    y for y in range(3) for z in range(2) if z    , p)",
                           "Generator expression must be parenthesized",
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index 325829864851c..db929bd881778 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -1062,7 +1062,7 @@ def test_clock_functions(self):
         clock_names = [
             "CLOCK_MONOTONIC", "clock_gettime", "clock_gettime_ns", "clock_settime",
             "clock_settime_ns", "clock_getres"]
-        
+
         if mac_ver >= (10, 12):
             for name in clock_names:
                 self.assertTrue(hasattr(time, name), f"time.{name} is not available")
diff --git a/Lib/typing.py b/Lib/typing.py
index 85908304270c0..f842fc23da6c6 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -99,7 +99,7 @@
     'NamedTuple',  # Not really a type.
     'TypedDict',  # Not really a type.
     'Generator',
- 
+
     # Other concrete types.
     'BinaryIO',
     'IO',
diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c
index aa63b685609cc..26c4b9bfb26b2 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 1ccad8e0e3d64..a33d15de9c0d4 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 e10f83c96c565..6f68c1f7f9b71 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 a6649598ec171..fdfe589eb80c1 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 38e523a802c09..6537a7ccd1e3c 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 e36e0c03476b5..dbe5d89b73962 100644
--- a/Objects/genericaliasobject.c
+++ b/Objects/genericaliasobject.c
@@ -578,7 +578,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/Objects/obmalloc.c b/Objects/obmalloc.c
index c1c12797aba11..1e06bee5c50ff 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -3035,7 +3035,7 @@ _PyObject_DebugMallocStats(FILE *out)
 
     fputc('\n', out);
 
-    /* Account for what all of those arena bytes are being used for. */ 
+    /* Account for what all of those arena bytes are being used for. */
     total = printone(out, "# bytes in allocated blocks", allocated_bytes);
     total += printone(out, "# bytes in available blocks", available_bytes);
 
diff --git a/Parser/tokenizer.h b/Parser/tokenizer.h
index ff563d57fa8b1..a40f7d9687b44 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/bootstrap_hash.c b/Python/bootstrap_hash.c
index a212f69870ed1..e189ce0d9014b 100644
--- a/Python/bootstrap_hash.c
+++ b/Python/bootstrap_hash.c
@@ -25,7 +25,7 @@
 #  include <sanitizer/msan_interface.h>
 #endif
 
-#if defined(__APPLE__) && defined(__has_builtin) 
+#if defined(__APPLE__) && defined(__has_builtin)
 #  if __has_builtin(__builtin_available)
 #    define HAVE_GETENTRYPY_GETRANDOM_RUNTIME __builtin_available(macOS 10.12, iOS 10.10, tvOS 10.0, watchOS 3.0, *)
 #  endif
@@ -221,7 +221,7 @@ py_getrandom(void *buffer, Py_ssize_t size, int blocking, int raise)
 
 #if defined(__APPLE__) && defined(__has_attribute) && __has_attribute(availability)
 static int
-py_getentropy(char *buffer, Py_ssize_t size, int raise) 
+py_getentropy(char *buffer, Py_ssize_t size, int raise)
         __attribute__((availability(macos,introduced=10.12)))
         __attribute__((availability(ios,introduced=10.0)))
         __attribute__((availability(tvos,introduced=10.0)))
diff --git a/Tools/c-analyzer/c_parser/_state_machine.py b/Tools/c-analyzer/c_parser/_state_machine.py
index b505b4e3e4724..53cbb13e7c4ed 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 f206f694db5a8..8da4d8cadf7d0 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