---
source: crates/ruff_linter/src/rules/ruff/mod.rs
---
RUF059 [*] Unpacked variable `c` is never used
  --> RUF059_0.py:24:6
   |
23 |     bar = (1, 2)
24 |     (c, d) = bar
   |      ^
25 |
26 |     (x, y) = baz = bar
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
23 |     bar = (1, 2)
   -     (c, d) = bar
24 +     (_c, d) = bar
25 |
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `d` is never used
  --> RUF059_0.py:24:9
   |
23 |     bar = (1, 2)
24 |     (c, d) = bar
   |         ^
25 |
26 |     (x, y) = baz = bar
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
23 |     bar = (1, 2)
   -     (c, d) = bar
24 +     (c, _d) = bar
25 |
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `x` is never used
  --> RUF059_0.py:26:6
   |
24 |     (c, d) = bar
25 |
26 |     (x, y) = baz = bar
   |      ^
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
25 |
   -     (x, y) = baz = bar
26 +     (_x, y) = baz = bar
27 |
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `y` is never used
  --> RUF059_0.py:26:9
   |
24 |     (c, d) = bar
25 |
26 |     (x, y) = baz = bar
   |         ^
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
25 |
   -     (x, y) = baz = bar
26 +     (x, _y) = baz = bar
27 |
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `connection` is never used
  --> RUF059_0.py:66:24
   |
64 |         return None, None
65 |
66 |     with connect() as (connection, cursor):
   |                        ^^^^^^^^^^
67 |         cursor.execute("SELECT * FROM users")
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
65 |
   -     with connect() as (connection, cursor):
66 +     with connect() as (_connection, cursor):
67 |         cursor.execute("SELECT * FROM users")
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `connection` is never used
  --> RUF059_0.py:74:24
   |
72 |         return None, None
73 |
74 |     with connect() as (connection, cursor):
   |                        ^^^^^^^^^^
75 |         cursor.execute("SELECT * FROM users")
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
73 |
   -     with connect() as (connection, cursor):
74 +     with connect() as (_connection, cursor):
75 |         cursor.execute("SELECT * FROM users")
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `this` is never used
  --> RUF059_0.py:79:49
   |
78 | def f():
79 |     with open("file") as my_file, open("") as ((this, that)):
   |                                                 ^^^^
80 |         print("hello")
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
78 | def f():
   -     with open("file") as my_file, open("") as ((this, that)):
79 +     with open("file") as my_file, open("") as ((_this, that)):
80 |         print("hello")
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `that` is never used
  --> RUF059_0.py:79:55
   |
78 | def f():
79 |     with open("file") as my_file, open("") as ((this, that)):
   |                                                       ^^^^
80 |         print("hello")
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
78 | def f():
   -     with open("file") as my_file, open("") as ((this, that)):
79 +     with open("file") as my_file, open("") as ((this, _that)):
80 |         print("hello")
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `this` is never used
  --> RUF059_0.py:86:23
   |
84 |     with (
85 |         open("file") as my_file,
86 |         open("") as ((this, that)),
   |                       ^^^^
87 |     ):
88 |         print("hello")
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
85 |         open("file") as my_file,
   -         open("") as ((this, that)),
86 +         open("") as ((_this, that)),
87 |     ):
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 [*] Unpacked variable `that` is never used
  --> RUF059_0.py:86:29
   |
84 |     with (
85 |         open("file") as my_file,
86 |         open("") as ((this, that)),
   |                             ^^^^
87 |     ):
88 |         print("hello")
   |
help: Prefix it with an underscore or any other dummy variable pattern
   |
85 |         open("file") as my_file,
   -         open("") as ((this, that)),
86 +         open("") as ((this, _that)),
87 |     ):
   |
note: This is an unsafe fix and may change runtime behavior

RUF059 Unpacked variable `x` is never used
   --> RUF059_0.py:101:5
    |
 99 | # see: https://github.com/astral-sh/ruff/issues/18507
100 | def f(_x):
101 |     x, = "1"
    |     ^
102 |     print(_x)
    |
help: Prefix it with an underscore or any other dummy variable pattern
