]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] Remove trailing spaces (GH-28709)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 3 Oct 2021 17:03:49 +0000 (20:03 +0300)
committerPablo Galindo <pablogsal@gmail.com>
Sun, 3 Oct 2021 23:40:48 +0000 (00:40 +0100)
15 files changed:
Include/internal/pycore_code.h
Lib/test/test_syntax.py
Lib/test/test_time.py
Lib/typing.py
Modules/_bisectmodule.c
Modules/_ctypes/_ctypes_test.c
Modules/_json.c
Modules/termios.c
Objects/exceptions.c
Objects/genericaliasobject.c
Objects/obmalloc.c
Parser/tokenizer.h
Python/bootstrap_hash.c
Tools/c-analyzer/c_parser/_state_machine.py
Tools/c-analyzer/c_parser/preprocessor/__init__.py

index f1e89d96b9ebb0647461f3aef9e8dddc8c9852de..8ff1863dc0015f6c1bf0fb66d427b678a09affee 100644 (file)
@@ -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 */
index f9deb7b3313a73f470ea06adefe8829870f491e0..45b2785f348314d6066f464e72f075682982d849 100644 (file)
@@ -1298,7 +1298,7 @@ class SyntaxTestCase(unittest.TestCase):
                 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 @@ class SyntaxTestCase(unittest.TestCase):
         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",
index 325829864851c3d8a93602ad808c1f97578e24e5..db929bd881778ccf53bb1bff6e08f76a70e20417 100644 (file)
@@ -1062,7 +1062,7 @@ class TestTimeWeaklinking(unittest.TestCase):
         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")
index 5873d536a9ec443ea022c20d2ec98da32df7bf26..00700ebc23cdc3470623245710ccfaef10308011 100644 (file)
@@ -99,7 +99,7 @@ __all__ = [
     'NamedTuple',  # Not really a type.
     'TypedDict',  # Not really a type.
     'Generator',
+
     # Other concrete types.
     'BinaryIO',
     'IO',
index aa63b685609cc0a597c273ff6fbb2e5383b69067..26c4b9bfb26b22f45901d083f97fbd73f9a04dec 100644 (file)
@@ -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 {
index 1ccad8e0e3d64d4d42fe36a3e9ba69069e220298..a33d15de9c0d413e4956630536e2903180332614 100644 (file)
@@ -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,
index e10f83c96c565f409de6588c18d8b3b1c47b4646..6f68c1f7f9b715d2894d4e187d8f418cd92bfde1 100644 (file)
@@ -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);
index a6649598ec1710ef74b35a281f38cfdc33189541..fdfe589eb80c1a4375bf56aa8ba29827b1c1e103 100644 (file)
@@ -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;
index 38e523a802c096a7554e6dcd8f5bf05d44c597d0..6537a7ccd1e3c6f81565652d9c3a5936b928fe99 100644 (file)
@@ -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);
index dda53cb53386455ec96b453a66189b8c448bd51c..38b68e410c443c3ec344058bb58908c4c880ecd3 100644 (file)
@@ -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) {
index c1c12797aba111a2f19bf5f740dc438d7551cdc7..1e06bee5c50ff1164c04c720cd217d9d64098a54 100644 (file)
@@ -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);
 
index ff563d57fa8b15a8804c84e87503e29d4b1724f9..a40f7d9687b44078065b3c1d751010bd3592b086 100644 (file)
@@ -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);
index a212f69870ed10f314ecc5e017402c4fb098e182..e189ce0d9014bf2d08bdb717b25e0bd02e86a19c 100644 (file)
@@ -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)))
index b505b4e3e47240b71d42521e315878017a9e5578..53cbb13e7c4edb375a4ca728f02155195d76ee43 100644 (file)
@@ -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'''
index f206f694db5a884508a8b49ac11694e37e0ba348..8da4d8cadf7d0eecc32819457ecdd4815cf2613f 100644 (file)
@@ -91,7 +91,7 @@ def get_preprocessor(*,
             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