python / python/mypy

Too many arguments with specific argument after *args

Open
#14,648 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug topic-calls
Dominant language
Python
Stars
20.6k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

Bug Report

When using specific arguments after providing arguments with *args, mypy will report an error.

To Reproduce

https://mypy-play.net/?mypy=latest&python=3.11&gist=f8b653e4348ebc7a4006c2a126ed0d85

Expected Behavior

Mypy should succeed.

Actual Behavior

main.py:5: error: Too many arguments for "foo"  [call-arg]
Found 1 error in 1 file (checked 1 source file)

Your Environment

See playground

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked mypy-play reproduction and the reported main.py:5 error, confirming the failure with Python 3.11 and the latest mypy. Trace the argument-checking path for calls using *args followed by a specific argument. Done means the reproduced example type-checks without the spurious "Too many arguments" error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.