File tree Expand file tree Collapse file tree
resources/test/fixtures/refurb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,3 +163,7 @@ def custom_decorator(func):
163163@custom_decorator
164164def add (x , y ):
165165 return x + y
166+
167+ # Regression https://github.com/astral-sh/ruff/issues/23076
168+ def func (rows ):
169+ rows .sort (key = lambda x : (x [x .find ("=" )], x [1 ]))
Original file line number Diff line number Diff line change @@ -311,7 +311,12 @@ fn itemgetter_op_tuple(
311311 . iter ( )
312312 . map ( |expr| {
313313 expr. as_subscript_expr ( )
314- . filter ( |expr| is_same_expression ( arg, & expr. value ) )
314+ . filter ( |expr| {
315+ is_same_expression ( arg, & expr. value )
316+ && !any_over_expr ( expr. slice . as_ref ( ) , & |expr| {
317+ is_same_expression ( arg, expr)
318+ } )
319+ } )
315320 . map ( |expr| expr. slice . as_ref ( ) )
316321 . map ( |slice| subscript_slice_to_string ( slice, locator) . to_string ( ) )
317322 } )
You can’t perform that action at this time.
0 commit comments