microsoft / pyright

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

Added optimization for assignment statements of the form `a, b = c, d… #8289

Closed erictraut closed 2 weeks ago

erictraut commented 2 weeks ago

…`. These create false dependencies between variables which can affect convergence of types during code flow analysis. In the common case, we can sever these false dependencies and evaluate only the dependent portion of the RHS.

github-actions[bot] commented 2 weeks ago

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅