Skip to content
New issue

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

Mypy should ignore type conflict between consecutive '_' variable assignments. #3077

Closed
gwk opened this issue Mar 29, 2017 · 1 comment
Closed

Comments

@gwk
Copy link

gwk commented Mar 29, 2017

The following is fairly typical tuple unpacking code.

t = (1, 1, 'a')
i, _, _ = t # error: Incompatible types in assignment (expression has type "str", variable has type "int")

Would it be reasonable for mypy to ignore the identifier _?

@gwk gwk changed the title Mypy should ignore type conflict between consecutive '_' variable. Mypy should ignore type conflict between consecutive '_' variable assignments. Mar 29, 2017
@refi64
Copy link
Contributor

refi64 commented Mar 29, 2017

Duplicate of #465.

@gwk gwk closed this as completed Mar 29, 2017
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

No branches or pull requests

2 participants