ruff
8fb29eaf - [ruff] improve handling of intermixed comments inside from-imports (#20561)

Commit
119 days ago
[ruff] improve handling of intermixed comments inside from-imports (#20561) Resolves a crash when attempting to format code like: ``` from x import (a as # whatever b) ``` Reworks the way comments are associated with nodes when parsing modules, so that all possible comment positions can be retained and reproduced during formatting. Overall follows Black's formatting style for multi-line import statements. Fixes issue #19138
Author
Parents
Loading