gh-146615: Fix format specifiers in Python/ directory (GH-146619)

This commit is contained in:
sunmy2019 2026-03-31 15:59:17 +08:00 committed by GitHub
parent b7055533ab
commit dcb260eff2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 13 additions and 13 deletions

View file

@ -602,7 +602,7 @@ _PyEval_MatchClass(PyThreadState *tstate, PyObject *subject, PyObject *type,
if (allowed < nargs) {
const char *plural = (allowed == 1) ? "" : "s";
_PyErr_Format(tstate, PyExc_TypeError,
"%s() accepts %d positional sub-pattern%s (%d given)",
"%s() accepts %zd positional sub-pattern%s (%zd given)",
((PyTypeObject*)type)->tp_name,
allowed, plural, nargs);
goto fail;
@ -1555,7 +1555,7 @@ format_missing(PyThreadState *tstate, const char *kind,
if (name_str == NULL)
return;
_PyErr_Format(tstate, PyExc_TypeError,
"%U() missing %i required %s argument%s: %U",
"%U() missing %zd required %s argument%s: %U",
qualname,
len,
kind,