Skip to content
Merged
Changes from all commits
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
5 changes: 4 additions & 1 deletion mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,10 @@ def _verify_signature(
# If the variable is in runtime.kwonly, it's just mislabelled as not a
# keyword-only argument
if stub_arg.variable.name not in runtime.kwonly:
yield f'runtime does not have argument "{stub_arg.variable.name}"'
msg = f'runtime does not have argument "{stub_arg.variable.name}"'
if runtime.varkw is not None:
msg += ". Maybe you forgot to make it keyword-only in the stub?"
yield msg
else:
yield f'stub argument "{stub_arg.variable.name}" is not keyword-only'
if stub.varpos is not None:
Expand Down