gh-107910: Remove not needing newline in error message (GH-107928)

This commit is contained in:
Joon Hwan 김준환 2023-08-14 18:26:18 +09:00 committed by GitHub
parent cc2cf85d03
commit c3887b57a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -989,8 +989,8 @@ class ClassPropertiesAndMethods(unittest.TestCase):
def test_mro_disagreement(self): def test_mro_disagreement(self):
# Testing error messages for MRO disagreement... # Testing error messages for MRO disagreement...
mro_err_msg = """Cannot create a consistent method resolution mro_err_msg = ("Cannot create a consistent method resolution "
order (MRO) for bases """ "order (MRO) for bases ")
def raises(exc, expected, callable, *args): def raises(exc, expected, callable, *args):
try: try:

View File

@ -2444,7 +2444,7 @@ set_mro_error(PyObject **to_merge, Py_ssize_t to_merge_size, int *remain)
n = PyDict_GET_SIZE(set); n = PyDict_GET_SIZE(set);
off = PyOS_snprintf(buf, sizeof(buf), "Cannot create a \ off = PyOS_snprintf(buf, sizeof(buf), "Cannot create a \
consistent method resolution\norder (MRO) for bases"); consistent method resolution order (MRO) for bases");
i = 0; i = 0;
while (PyDict_Next(set, &i, &k, &v) && (size_t)off < sizeof(buf)) { while (PyDict_Next(set, &i, &k, &v) && (size_t)off < sizeof(buf)) {
PyObject *name = class_name(k); PyObject *name = class_name(k);