-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Copy link
Labels
tyMulti-file analysis & type inferenceMulti-file analysis & type inference
Description
As #13316 is merged, there are some follow-up work that needs to be done. The following is a list in the order of priority where the highest priority work is on the top:
- Avoiding duplicate diagnostics. Considering
(a, b) = (1, 2), as the inference runs for each symbol, if there are any diagnostics that's raised during that part (like "too many values to unpack"), then there will be multiple diagnostics added to the builder one for each symbol. Refer [red-knot] Infer target types for unpacked tuple assignment #13316 (comment) - Use the unpacking logic in other places where it's relevant like
-
forloops e.g.,for (x, y) in ((1, 2), (3, 4)): ...([red-knot] Add support for unpackingfortarget #15058) -
withstatements e.g.,with (item1, item2) as (x, y): ... - Comprehensions e.g.,
[_ for (x, y) in [(1, 2), (3, 4)]]
-
- Additional diagnostics when the number of targets is not equal to the number of elements on the RHS ([red-knot] Add diagnostic for invalid unpacking #15086)
carljm, cake-monotone and T-256
Sub-issues
Metadata
Metadata
Assignees
Labels
tyMulti-file analysis & type inferenceMulti-file analysis & type inference