---
source: crates/ruff_linter/src/rules/ruff/mod.rs
---
ERA001 [*] Found commented-out code
 --> RUF100_5.py:7:5
  |
5 |     # "key1": 123,  # noqa: ERA001
6 |     # "key2": 456,  # noqa
7 |     # "key3": 789,
  |     ^^^^^^^^^^^^^^
8 | }
  |
help: Remove commented-out code
  |
6 |     # "key2": 456,  # noqa
  -     # "key3": 789,
7 | }
  |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> RUF100_5.py:11:1
   |
11 | #import os  # noqa: E501
   | ^^^^^^^^^^^^^^^^^^^^^^^^
12 |
13 | def f():
   |
help: Remove commented-out code
   |
10 |
   - #import os  # noqa: E501
11 |
   |
note: This is a display-only fix and is likely to be incorrect

RUF100 [*] Unused `noqa` directive (unused: `E501`)
  --> RUF100_5.py:11:13
   |
11 | #import os  # noqa: E501
   |             ^^^^^^^^^^^^
12 |
13 | def f():
   |
help: Remove unused `noqa` directive
   |
10 |
   - #import os  # noqa: E501
11 + #import os
12 |
   |

RUF100 [*] Unused `noqa` directive (non-enabled: `RET504`)
  --> RUF100_5.py:16:18
   |
14 |     data = 1
15 |     # line below should autofix to `return data  # fmt: skip`
16 |     return data  # noqa: RET504 # fmt: skip
   |                  ^^^^^^^^^^^^^^
17 |
18 | def f():
   |
help: Remove unused `noqa` directive
   |
15 |     # line below should autofix to `return data  # fmt: skip`
   -     return data  # noqa: RET504 # fmt: skip
16 +     return data  # fmt: skip
17 |
   |

RUF100 [*] Unused `noqa` directive (non-enabled: `RET504`)
  --> RUF100_5.py:21:18
   |
19 |     data = 1
20 |     # line below should autofix to `return data`
21 |     return data  # noqa: RET504 - intentional incorrect noqa, will be removed
   |                  ^^^^^^^^^^^^^^
   |
help: Remove unused `noqa` directive
   |
20 |     # line below should autofix to `return data`
   -     return data  # noqa: RET504 - intentional incorrect noqa, will be removed
21 +     return data
22 |
   |

ERA001 [*] Found commented-out code
  --> RUF100_5.py:25:1
   |
24 | # Regression test for https://github.com/astral-sh/ruff/issues/25386
25 | # )
   | ^^^
26 | # )  # noqa: ERA001
   |
help: Remove commented-out code
   |
24 | # Regression test for https://github.com/astral-sh/ruff/issues/25386
   - # )
25 | # )  # noqa: ERA001
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> RUF100_5.py:28:1
   |
26 | # )  # noqa: ERA001
27 |
28 | # (
   | ^^^
29 | # (  # noqa: ERA001
   |
help: Remove commented-out code
   |
27 |
   - # (
28 | # (  # noqa: ERA001
   |
note: This is a display-only fix and is likely to be incorrect
