8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99ba048 commit bcd4ff2Copy full SHA for bcd4ff2
mypy/stubtest.py
@@ -890,7 +890,10 @@ def _verify_signature(
890
# If the variable is in runtime.kwonly, it's just mislabelled as not a
891
# keyword-only argument
892
if stub_arg.variable.name not in runtime.kwonly:
893
- yield f'runtime does not have argument "{stub_arg.variable.name}"'
+ msg = f'runtime does not have argument "{stub_arg.variable.name}"'
894
+ if runtime.varkw is not None:
895
+ msg += ". Maybe you forgot to make it keyword-only in the stub?"
896
+ yield msg
897
else:
898
yield f'stub argument "{stub_arg.variable.name}" is not keyword-only'
899
if stub.varpos is not None:
0 commit comments