You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setting only * to an empty parameter list gets a wrong error message saying "arguments" instead of "parameters" #21003
Hi @kavik2002 — triaging the open issue queue. I think the premise here may not be actionable on mypy's side.
The error message you quoted, Named arguments must follow bare *, is not emitted by mypy — it comes from CPython's parser itself, before mypy ever sees the source. You can confirm with vanilla CPython:
python3 -c "import ast; ast.parse('def f(*): pass')"# SyntaxError: named arguments must follow bare *
I also ran rg -n 'must follow bare' mypy/ on master (commit b74aae4) and there are no matches in the mypy codebase, which is consistent with the message originating in CPython.
So the wording change you're proposing would have to land in CPython itself — for example in Parser/parser.c / Parser/Python.gram — not in mypy. (Though note that "argument" vs "parameter" is a long-running terminology debate inside CPython too; rewording an existing SyntaxError is harder to land than adjusting an analyser-tool message.)
Given this, this issue may be a candidate to close on the mypy tracker. Happy to be wrong if I'm missing somewhere mypy actually re-emits or rewrites this message — point me at the file and I'll dig further.
(Disclosure: I drafted this comment with help from Claude Code while triaging open issues; the CPython repro above was run manually before posting.)
Activity
jbbqqf commentedon May 9, 2026
Hi @kavik2002 — triaging the open issue queue. I think the premise here may not be actionable on mypy's side.
The error message you quoted,
Named arguments must follow bare *, is not emitted by mypy — it comes from CPython's parser itself, before mypy ever sees the source. You can confirm with vanilla CPython:I also ran
rg -n 'must follow bare' mypy/onmaster(commit b74aae4) and there are no matches in the mypy codebase, which is consistent with the message originating in CPython.So the wording change you're proposing would have to land in CPython itself — for example in
Parser/parser.c/Parser/Python.gram— not in mypy. (Though note that "argument" vs "parameter" is a long-running terminology debate inside CPython too; rewording an existingSyntaxErroris harder to land than adjusting an analyser-tool message.)Given this, this issue may be a candidate to close on the mypy tracker. Happy to be wrong if I'm missing somewhere mypy actually re-emits or rewrites this message — point me at the file and I'll dig further.
(Disclosure: I drafted this comment with help from Claude Code while triaging open issues; the CPython repro above was run manually before posting.)