microsoft / pyright

Static Type Checker for Python
Other
12.7k stars 1.35k forks source link

Syntax error on valid python code #8310

Closed aspizu closed 1 week ago

aspizu commented 1 week ago
a=[]
a+=0,*[]
Expected expression (near *)
erictraut commented 1 week ago

Thanks for the bug report. It appears that the grammar rules for Python changed between 3.8 and 3.9. The above code generates a syntax error with 3.8 but is allowed in 3.9.

Could someone from the pylance team please transfer this issue to pyright?

erictraut commented 1 week ago

This is addressed in pyright 1.1.371.