mirror of
https://github.com/python/cpython.git
synced 2026-04-15 08:11:10 +00:00
gh-146615: Fix format specifiers in Python/ directory (GH-146619)
This commit is contained in:
parent
b7055533ab
commit
dcb260eff2
6 changed files with 13 additions and 13 deletions
|
|
@ -2421,7 +2421,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs,
|
|||
if (i < parser->min) {
|
||||
/* Less arguments than required */
|
||||
if (i < pos) {
|
||||
Py_ssize_t min = Py_MIN(pos, parser->min);
|
||||
int min = Py_MIN(pos, parser->min);
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s%s takes %s %d positional argument%s"
|
||||
" (%zd given)",
|
||||
|
|
@ -2435,7 +2435,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs,
|
|||
else {
|
||||
keyword = PyTuple_GET_ITEM(kwtuple, i - pos);
|
||||
PyErr_Format(PyExc_TypeError, "%.200s%s missing required "
|
||||
"argument '%U' (pos %d)",
|
||||
"argument '%U' (pos %zd)",
|
||||
(parser->fname == NULL) ? "function" : parser->fname,
|
||||
(parser->fname == NULL) ? "" : "()",
|
||||
keyword, i+1);
|
||||
|
|
@ -2476,7 +2476,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs,
|
|||
/* arg present in tuple and in dict */
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"argument for %.200s%s given by name ('%U') "
|
||||
"and position (%d)",
|
||||
"and position (%zd)",
|
||||
(parser->fname == NULL) ? "function" : parser->fname,
|
||||
(parser->fname == NULL) ? "" : "()",
|
||||
keyword, i+1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue