We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a following code:
#! /usr/bin/env python from typing import Any def function(a, b, c=False, **kwargs): # type: (str, int, bool, **Any) -> None print "Got the following:", repr(a), repr(b), repr(c), repr(kwargs) def main(): # type: () -> None function('a', 2, **{'optional1': 1}) if __name__ == '__main__': main()
When I run it it produces this result:
$ ./test.py Got the following: 'a' 2 False {'optional1': 1}
It looks like mypy thinks that the kwargs were passed as argument c which is incorrect:
c
$ ../py37/bin/mypy --python-executable ../py27/bin/python test.py test.py:13: error: Argument 3 to "function" has incompatible type "**Dict[str, int]"; expected "bool"
The mypy version is 0.641
The text was updated successfully, but these errors were encountered:
For mypy this is just a dictionary, even if it is just a literal, so this is a duplicate of #5382.
Sorry, something went wrong.
I looks like I mentioned wrong issue when closing, this is not a duplicate of #5382 but of #1969
No branches or pull requests
I have a following code:
When I run it it produces this result:
It looks like mypy thinks that the kwargs were passed as argument
c
which is incorrect:The mypy version is 0.641
The text was updated successfully, but these errors were encountered: