Skip to content

Correct check_arg_kinds(), its relates and error messages#20961

Open
hyperkai wants to merge 1 commit intopython:masterfrom
hyperkai:hyperkai-patch-6
Open

Correct check_arg_kinds(), its relates and error messages#20961
hyperkai wants to merge 1 commit intopython:masterfrom
hyperkai:hyperkai-patch-6

Conversation

@hyperkai
Copy link
Contributor

@hyperkai hyperkai commented Mar 3, 2026

Fix: #20943

I corrected the method name below, its relates and the error messages below:

check_arg_kinds -> check_param_kinds
From 'Required positional args may not appear after default, named or var args'
To   'Required positional params may not appear after default, named or var params'
From 'Positional default args may not appear after named or var args'
To   'Positional default params may not appear after named or var params'
From 'Var args may not appear after named or var args'
To   'Var params may not appear after named or var params'
From 'kwargs argument must be the last argument'
To   'kwargs parameter must be the last parameter'
From 'You may only have one **kwargs argument'
To   'You may only have one **kwargs parameter'

But if you're worried that mypy may be broken, I'll revert the changes except the error messages above.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

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.

mypy-internally, check_arg_kinds() should be check_param_kinds() and its relates should also be corrected

1 participant