mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
Fix: Avoid parenthesizing subscript targets and values (#9209)
This commit is contained in:
parent
5d41c84ef7
commit
ef4bd8d5ff
3 changed files with 89 additions and 14 deletions
|
@ -153,6 +153,23 @@ this_is_a_ridiculously_long_name_and_nobody_in_their_right_mind_would_use = (
|
|||
function().b().c([1, 2, 3], arg1, [1, 2, 3], arg2, [1, 2, 3], arg3)
|
||||
)
|
||||
|
||||
#######
|
||||
# Subscripts and non-fluent attribute chains
|
||||
a = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[
|
||||
xxxxx
|
||||
].bbvbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb[
|
||||
yyyyyyyyyy[aaaa]
|
||||
] = ccccccccccccccccccccccccccccccccccc["aaaaaaa"]
|
||||
|
||||
a = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[
|
||||
xxxxx
|
||||
].bbvbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = ccccccccccccccccccccccccccccccccccc[
|
||||
"aaaaaaa"
|
||||
]
|
||||
|
||||
label_thresholds[label_id] = label_quantiles[label_id][
|
||||
min(int(tolerance * num_thresholds), num_thresholds - 1)
|
||||
]
|
||||
|
||||
#######
|
||||
# Test comment inlining
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue