---
source: crates/ruff_linter/src/rules/eradicate/mod.rs
---
ERA001 [*] Found commented-out code
 --> ERA001.py:1:1
  |
1 | #import os
  | ^^^^^^^^^^
2 | # from foo import junk
3 | #a = 3
  |
help: Remove commented-out code
  |
  - #import os
1 | # from foo import junk
  |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
 --> ERA001.py:2:1
  |
1 | #import os
2 | # from foo import junk
  | ^^^^^^^^^^^^^^^^^^^^^^
3 | #a = 3
4 | a = 4
  |
help: Remove commented-out code
  |
1 | #import os
  - # from foo import junk
2 | #a = 3
  |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
 --> ERA001.py:3:1
  |
1 | #import os
2 | # from foo import junk
3 | #a = 3
  | ^^^^^^
4 | a = 4
5 | #foo(1, 2, 3)
  |
help: Remove commented-out code
  |
2 | # from foo import junk
  - #a = 3
3 | a = 4
  |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
 --> ERA001.py:5:1
  |
3 | #a = 3
4 | a = 4
5 | #foo(1, 2, 3)
  | ^^^^^^^^^^^^^
6 |
7 | def foo(x, y, z):
  |
help: Remove commented-out code
  |
4 | a = 4
  - #foo(1, 2, 3)
5 |
  |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:13:5
   |
11 |     # This is a real comment.
12 |     # # This is a (nested) comment.
13 |     #return True
   |     ^^^^^^^^^^^^
14 |     return False
   |
help: Remove commented-out code
   |
12 |     # # This is a (nested) comment.
   -     #return True
13 |     return False
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:21:5
   |
19 | class A():
20 |     pass
21 |     # b = c
   |     ^^^^^^^
   |
help: Remove commented-out code
   |
20 |     pass
   -     # b = c
21 |
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:26:5
   |
24 | dictionary = {
25 |     # "key1": 123,  # noqa: ERA001
26 |     # "key2": 456,
   |     ^^^^^^^^^^^^^^
27 |     # "key3": 789,  # test
28 | }
   |
help: Remove commented-out code
   |
25 |     # "key1": 123,  # noqa: ERA001
   -     # "key2": 456,
26 |     # "key3": 789,  # test
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:27:5
   |
25 |     # "key1": 123,  # noqa: ERA001
26 |     # "key2": 456,
27 |     # "key3": 789,  # test
   |     ^^^^^^^^^^^^^^^^^^^^^^
28 | }
   |
help: Remove commented-out code
   |
26 |     # "key2": 456,
   -     # "key3": 789,  # test
27 | }
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:32:1
   |
30 | #import os  # noqa
31 |
32 | # case 1:
   | ^^^^^^^^^
33 | # try:
34 | # try:  # with comment
   |
help: Remove commented-out code
   |
31 |
   - # case 1:
32 | # try:
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:33:1
   |
32 | # case 1:
33 | # try:
   | ^^^^^^
34 | # try:  # with comment
35 | # try: print()
   |
help: Remove commented-out code
   |
32 | # case 1:
   - # try:
33 | # try:  # with comment
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:34:1
   |
32 | # case 1:
33 | # try:
34 | # try:  # with comment
   | ^^^^^^^^^^^^^^^^^^^^^^
35 | # try: print()
36 | # except:
   |
help: Remove commented-out code
   |
33 | # try:
   - # try:  # with comment
34 | # try: print()
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:35:1
   |
33 | # try:
34 | # try:  # with comment
35 | # try: print()
   | ^^^^^^^^^^^^^^
36 | # except:
37 | # except Foo:
   |
help: Remove commented-out code
   |
34 | # try:  # with comment
   - # try: print()
35 | # except:
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:36:1
   |
34 | # try:  # with comment
35 | # try: print()
36 | # except:
   | ^^^^^^^^^
37 | # except Foo:
38 | # except Exception as e: print(e)
   |
help: Remove commented-out code
   |
35 | # try: print()
   - # except:
36 | # except Foo:
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:37:1
   |
35 | # try: print()
36 | # except:
37 | # except Foo:
   | ^^^^^^^^^^^^^
38 | # except Exception as e: print(e)
   |
help: Remove commented-out code
   |
36 | # except:
   - # except Foo:
37 | # except Exception as e: print(e)
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:38:1
   |
36 | # except:
37 | # except Foo:
38 | # except Exception as e: print(e)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: Remove commented-out code
   |
37 | # except Foo:
   - # except Exception as e: print(e)
38 |
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:44:1
   |
43 | # requires-python = ">=3.11"
44 | # dependencies = [
   | ^^^^^^^^^^^^^^^^^^
45 | #   "requests<3",
46 | #   "rich",
   |
help: Remove commented-out code
   |
43 | # requires-python = ">=3.11"
   - # dependencies = [
44 | #   "requests<3",
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:47:1
   |
45 | #   "requests<3",
46 | #   "rich",
47 | # ]
   | ^^^
48 | # ///
   |
help: Remove commented-out code
   |
46 | #   "rich",
   - # ]
47 | # ///
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:75:1
   |
73 | # /// script
74 | # requires-python = ">=3.11"
75 | # dependencies = [
   | ^^^^^^^^^^^^^^^^^^
76 | #   "requests<3",
77 | #   "rich",
   |
help: Remove commented-out code
   |
74 | # requires-python = ">=3.11"
   - # dependencies = [
75 | #   "requests<3",
   |
note: This is a display-only fix and is likely to be incorrect

ERA001 [*] Found commented-out code
  --> ERA001.py:78:1
   |
76 | #   "requests<3",
77 | #   "rich",
78 | # ]
   | ^^^
79 |
80 | # Script tag block followed by normal block (Ok)
   |
help: Remove commented-out code
   |
77 | #   "rich",
   - # ]
78 |
   |
note: This is a display-only fix and is likely to be incorrect
