Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Unbalanced tuple unpack gets incorrect type #403

Open
jakebailey opened this issue Nov 19, 2018 · 2 comments
Open

Unbalanced tuple unpack gets incorrect type #403

jakebailey opened this issue Nov 19, 2018 · 2 comments
Labels
gen from the generated tests

Comments

@jakebailey
Copy link
Member

jakebailey commented Nov 19, 2018

image

Only x should be an int, but y is being shown as one too. This will technically raise a ValueError ("not enough values to unpack"), but we shouldn't show any completion on y (which would be misleading).

Likely related is this:

(x, *y) = (1,)

Completing on y should tell you that it's a list, but we show nothing.

Found in #334.

@jakebailey
Copy link
Member Author

jakebailey commented Nov 19, 2018

Also, this:

(x, y, z) = (1, "")

z is also shown as an int.

(Note that the parens are optional in all of these, of course.)

@jakebailey
Copy link
Member Author

Partially fixed by #546:

403-1

403-2

Probably related to #412.

@jakebailey jakebailey added the gen from the generated tests label Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
gen from the generated tests
Projects
None yet
Development

No branches or pull requests

1 participant