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
It's a common pattern to use assignment to _ in code to ignore variables that aren't used, and mypy doesn't support that:
_
/home/tabbott/foo.py:2: error: Incompatible types in assignment (expression has type "str", variable has type "int")
In my real code the usage looks more like this:
for (email, _, _, _) in users: ...
Not sure whether the right answer is to change the code, but I think I'd flag this as an interesting case that may be somewhat common.
The text was updated successfully, but these errors were encountered:
It's common enough to flag a few variable names as special as targets: _, __, and unused have all been recommended at various times.
__
unused
Sorry, something went wrong.
This is a duplicate of #465.
Yes, it looks like this is a duplicate. I think it makes sense to only keep one of them open.
No branches or pull requests
It's a common pattern to use assignment to
_
in code to ignore variables that aren't used, and mypy doesn't support that:/home/tabbott/foo.py:2: error: Incompatible types in assignment (expression has type "str", variable has type "int")
In my real code the usage looks more like this:
Not sure whether the right answer is to change the code, but I think I'd flag this as an interesting case that may be somewhat common.
The text was updated successfully, but these errors were encountered: