From a5a56154f14f3f4656a510e8b79e96d06289e654 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 3 Oct 2021 16:58:14 +0300 Subject: [PATCH] Remove trailing spaces. (GH-28706) --- Lib/test/test_syntax.py | 4 ++-- Lib/test/test_tokenize.py | 2 +- Modules/termios.c | 2 +- Python/Python-tokenize.c | 2 +- Python/bltinmodule.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index f4a507e91fa..3ce362788da 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -1299,7 +1299,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") @@ -1439,7 +1439,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_tokenize.py b/Lib/test/test_tokenize.py index f8b16e52976..ca2821de7c0 100644 --- a/Lib/test/test_tokenize.py +++ b/Lib/test/test_tokenize.py @@ -1933,7 +1933,7 @@ def test_string(self): c"""', """\ STRING 'rb"\""a\\\\\\nb\\\\\\nc"\""' (1, 0) (3, 4) """) - + self.check_tokenize('f"abc"', """\ STRING 'f"abc"' (1, 0) (1, 6) """) diff --git a/Modules/termios.c b/Modules/termios.c index 38573e25f51..354e5ca18d0 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -408,7 +408,7 @@ termios_tcsetwinsize_impl(PyObject *module, int fd, PyObject *winsz) } Py_XDECREF(tmp_item); tmp_item = PySequence_GetItem(winsz, 1); - winsz_1 = PyLong_AsLong(tmp_item); + winsz_1 = PyLong_AsLong(tmp_item); if (winsz_1 == -1 && PyErr_Occurred()) { Py_XDECREF(tmp_item); return NULL; diff --git a/Python/Python-tokenize.c b/Python/Python-tokenize.c index 2933b5b7b1e..fa713282558 100644 --- a/Python/Python-tokenize.c +++ b/Python/Python-tokenize.c @@ -150,7 +150,7 @@ static PyMethodDef tokenize_methods[] = { }; static PyModuleDef_Slot tokenizemodule_slots[] = { - {Py_mod_exec, tokenizemodule_exec}, + {Py_mod_exec, tokenizemodule_exec}, {0, NULL} }; diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index d0d31805b30..1f038166890 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2485,7 +2485,7 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start) switch (Py_SIZE(item)) { case -1: b = -(sdigit) ((PyLongObject*)item)->ob_digit[0]; break; // Note: the continue goes to the top of the "while" loop that iterates over the elements - case 0: Py_DECREF(item); continue; + case 0: Py_DECREF(item); continue; case 1: b = ((PyLongObject*)item)->ob_digit[0]; break; default: b = PyLong_AsLongAndOverflow(item, &overflow); break; }