🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@hauntsaninja
Copy link
Collaborator

No description provided.

@hauntsaninja hauntsaninja changed the title Always complain about invalid varargs Always complain about invalid varargs and varkwargs Nov 28, 2024
f(*(a,))

f(*4) # E: Expected iterable as variadic argument
f(a, *4) # E: Expected iterable as variadic argument
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prior false negative

f(**kwargs) # E: Argument after ** must be a mapping, not "Optional[Any]"

def g(a: int) -> None: pass
g(a=1, **4) # E: Argument after ** must be a mapping, not "int"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prior false negative

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@hauntsaninja hauntsaninja merged commit c00f82f into python:master Nov 29, 2024
19 checks passed
@hauntsaninja hauntsaninja deleted the invalid-arg branch November 29, 2024 22:57
hauntsaninja added a commit to hauntsaninja/mypy that referenced this pull request Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant