Remove trailing spaces. (GH-28706)

This commit is contained in:
Serhiy Storchaka 2021-10-03 16:58:14 +03:00 committed by GitHub
parent dc878240dc
commit a5a56154f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -1299,7 +1299,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")
@ -1439,7 +1439,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",

View File

@ -1933,7 +1933,7 @@ b\
c"""', """\
STRING 'rb"\""a\\\\\\nb\\\\\\nc"\""' (1, 0) (3, 4)
""")
self.check_tokenize('f"abc"', """\
STRING 'f"abc"' (1, 0) (1, 6)
""")

View File

@ -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;

View File

@ -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}
};

View File

@ -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;
}