mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-23 04:55:09 +00:00
Fix unstable formatting of trailing end-of-line comments of parenthesized attribute values (#16187)
This commit is contained in:
parent
82eae511ca
commit
31180a84e4
4 changed files with 93 additions and 13 deletions
|
@ -152,3 +152,20 @@ result = (
|
|||
f(111111111111111111111111111111111111111111111111111111111111111111111111111111111)
|
||||
+ 1
|
||||
).bit_length()
|
||||
|
||||
|
||||
# Regression test for https://github.com/astral-sh/ruff/issues/16151
|
||||
result = (
|
||||
(await query_the_thing(mypy_doesnt_understand)) # type: ignore[x]
|
||||
.foo()
|
||||
.bar()
|
||||
)
|
||||
|
||||
(
|
||||
(
|
||||
a # trailing end-of-line
|
||||
# trailing own-line
|
||||
) # trailing closing parentheses
|
||||
# dangling before dot
|
||||
.b # trailing end-of-line
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue