Skip to content

Always complain about invalid varargs and varkwargs #18207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
varkwargs test
  • Loading branch information
hauntsaninja committed Nov 28, 2024
commit f5ae3a7ca5b467cf4958af62daa26f462da2915d
3 changes: 3 additions & 0 deletions test-data/unit/check-kwargs.test
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ f(**d) # E: Keywords must be strings
f(**A()) # E: Argument after ** must be a mapping, not "A"
kwargs: Optional[Any]
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

[builtins fixtures/dict.pyi]

[case testPassingKeywordVarArgsToNonVarArgsFunction]
Expand Down