Skip to content

Commit

Permalink
Fix false positive in FURB118:
Browse files Browse the repository at this point in the history
Closes #335
  • Loading branch information
dosisod committed Nov 21, 2024
1 parent dd80a28 commit 27fc566
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion refurb/checks/readability/use_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def check(node: FuncItem, errors: list[Error]) -> None:

errors.append(ErrorInfo.from_node(node, msg))

case TupleExpr(items=items) if items:
case TupleExpr(items=items) if len(items) > 1:
tuple_args: list[str] = []

for item in items:
Expand Down
1 change: 1 addition & 0 deletions test/data/err_118.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ def f2(x):
lambda x, y: (x[0], y[0])
lambda x: ()
lambda x: (*x[0], x[1])
lambda x: (x[0],)

0 comments on commit 27fc566

Please sign in to comment.