---
source: crates/ruff_linter/src/rules/ruff/mod.rs
---
RUF059 [*] Unpacked variable `x2` is never used
 --> RUF059_2.py:8:20
  |
6 |         pass
7 |
8 |     with foo() as (x2, y2):
  |                    ^^
9 |         pass
  |
help: Prefix it with an underscore or any other dummy variable pattern
  |
7 |
  -     with foo() as (x2, y2):
8 +     with foo() as (_x2, y2):
9 |         pass
  |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `y2` is never used
 --> RUF059_2.py:8:24
  |
6 |         pass
7 |
8 |     with foo() as (x2, y2):
  |                        ^^
9 |         pass
  |
help: Prefix it with an underscore or any other dummy variable pattern
  |
7 |
  -     with foo() as (x2, y2):
8 +     with foo() as (x2, _y2):
9 |         pass
  |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `x2` is never used
  --> RUF059_2.py:17:6
   |
15 | def f():
16 |     (x1, y1) = (1, 2)
17 |     (x2, y2) = coords2 = (1, 2)
   |      ^^
18 |     coords3 = (x3, y3) = (1, 2)
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
16 |     (x1, y1) = (1, 2)
   -     (x2, y2) = coords2 = (1, 2)
17 +     (_x2, y2) = coords2 = (1, 2)
18 |     coords3 = (x3, y3) = (1, 2)
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `y2` is never used
  --> RUF059_2.py:17:10
   |
15 | def f():
16 |     (x1, y1) = (1, 2)
17 |     (x2, y2) = coords2 = (1, 2)
   |          ^^
18 |     coords3 = (x3, y3) = (1, 2)
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
16 |     (x1, y1) = (1, 2)
   -     (x2, y2) = coords2 = (1, 2)
17 +     (x2, _y2) = coords2 = (1, 2)
18 |     coords3 = (x3, y3) = (1, 2)
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `x3` is never used
  --> RUF059_2.py:18:16
   |
16 |     (x1, y1) = (1, 2)
17 |     (x2, y2) = coords2 = (1, 2)
18 |     coords3 = (x3, y3) = (1, 2)
   |                ^^
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
17 |     (x2, y2) = coords2 = (1, 2)
   -     coords3 = (x3, y3) = (1, 2)
18 +     coords3 = (_x3, y3) = (1, 2)
19 |
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `y3` is never used
  --> RUF059_2.py:18:20
   |
16 |     (x1, y1) = (1, 2)
17 |     (x2, y2) = coords2 = (1, 2)
18 |     coords3 = (x3, y3) = (1, 2)
   |                    ^^
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
17 |     (x2, y2) = coords2 = (1, 2)
   -     coords3 = (x3, y3) = (1, 2)
18 +     coords3 = (x3, _y3) = (1, 2)
19 |
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `x` is never used
  --> RUF059_2.py:22:24
   |
21 | def f():
22 |     with Nested(m) as (x, y):
   |                        ^
23 |         pass
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
21 | def f():
   -     with Nested(m) as (x, y):
22 +     with Nested(m) as (_x, y):
23 |         pass
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `y` is never used
  --> RUF059_2.py:22:27
   |
21 | def f():
22 |     with Nested(m) as (x, y):
   |                           ^
23 |         pass
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
21 | def f():
   -     with Nested(m) as (x, y):
22 +     with Nested(m) as (x, _y):
23 |         pass
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `a` is never used
  --> RUF059_2.py:27:17
   |
26 | def f():
27 |     toplevel = (a, b) = lexer.get_token()
   |                 ^
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
26 | def f():
   -     toplevel = (a, b) = lexer.get_token()
27 +     toplevel = (_a, b) = lexer.get_token()
28 |
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `b` is never used
  --> RUF059_2.py:27:20
   |
26 | def f():
27 |     toplevel = (a, b) = lexer.get_token()
   |                    ^
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
26 | def f():
   -     toplevel = (a, b) = lexer.get_token()
27 +     toplevel = (a, _b) = lexer.get_token()
28 |
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `a` is never used
  --> RUF059_2.py:31:6
   |
30 | def f():
31 |     (a, b) = toplevel = lexer.get_token()
   |      ^
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
30 | def f():
   -     (a, b) = toplevel = lexer.get_token()
31 +     (_a, b) = toplevel = lexer.get_token()
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `b` is never used
  --> RUF059_2.py:31:9
   |
30 | def f():
31 |     (a, b) = toplevel = lexer.get_token()
   |         ^
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
30 | def f():
   -     (a, b) = toplevel = lexer.get_token()
31 +     (a, _b) = toplevel = lexer.get_token()
   |
note: This is an unsafe fix and may change runtime behavior
