mirror of
https://github.com/python/cpython.git
synced 2026-04-14 15:50:50 +00:00
[3.13] gh-146615: Fix format specifiers in Python/ directory (GH-146619) (GH-146654)
(cherry picked from commit dcb260eff2)
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
This commit is contained in:
parent
499df18d80
commit
e726d28a23
5 changed files with 10 additions and 10 deletions
|
|
@ -513,7 +513,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;
|
||||
|
|
@ -1183,7 +1183,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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue