This tests the diagnostic rendering of a case that wasn't previously covered by snapshots: when unpacking fails because there are too few values, but where the left hand side can tolerate "N or more." In the code, this is a distinct diagnostic, so we capture it here. (Sorry about the diff here, but it made sense to rename the other sections and that changes the name of the snapshot file.)
403 B
403 B
Unpacking
Right hand side not iterable
a, b = 1 # error: [not-iterable]
Exactly too many values to unpack
a, b = (1, 2, 3) # error: [invalid-assignment]
Exactly too few values to unpack
a, b = (1,) # error: [invalid-assignment]
Too few values to unpack
[a, *b, c, d] = (1, 2) # error: [invalid-assignment]