mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 05:20:49 -05:00
This is a follow-up to https://github.com/astral-sh/ruff/pull/19344 that improves the error formatting slightly. For example with this program: ```py def f(): global foo, bar ``` Before we printed: ``` 1 | def f(): 2 | global foo, bar | ^^^^^^^^^^^^^^^ `foo` has no declarations or bindings in the global scope ... 1 | def f(): 2 | global foo, bar | ^^^^^^^^^^^^^^^ `bar` has no declarations or bindings in the global scope ``` Now we print: ``` 1 | def f(): 2 | global foo, bar | ^^^ `foo` has no declarations or bindings in the global scope ... 1 | def f(): 2 | global foo, bar | ^^^ `bar` has no declarations or bindings in the global scope ``` --------- Co-authored-by: Micha Reiser <micha@reiser.io>