---
source: crates/ruff_linter/src/rules/refurb/mod.rs
---
FURB148 [*] `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:14:17
   |
13 | # Errors
14 | for index, _ in enumerate(books):
   |                 ^^^^^^^^^
15 |     print(index)
   |
help: Replace with `range(len(...))`
   |
13 | # Errors
   - for index, _ in enumerate(books):
14 + for index in range(len(books)):
15 |     print(index)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:17:17
   |
15 |     print(index)
16 |
17 | for index, _ in enumerate(books, start=0):
   |                 ^^^^^^^^^
18 |     print(index)
   |
help: Replace with `range(len(...))`
   |
16 |
   - for index, _ in enumerate(books, start=0):
17 + for index in range(len(books)):
18 |     print(index)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:20:17
   |
18 |     print(index)
19 |
20 | for index, _ in enumerate(books, 0):
   |                 ^^^^^^^^^
21 |     print(index)
   |
help: Replace with `range(len(...))`
   |
19 |
   - for index, _ in enumerate(books, 0):
20 + for index in range(len(books)):
21 |     print(index)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:23:17
   |
21 |     print(index)
22 |
23 | for index, _ in enumerate(books, start=1):
   |                 ^^^^^^^^^
24 |     print(index)
   |
help: Replace with `range(len(...))`

FURB148 `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:26:17
   |
24 |     print(index)
25 |
26 | for index, _ in enumerate(books, 1):
   |                 ^^^^^^^^^
27 |     print(index)
   |
help: Replace with `range(len(...))`

FURB148 `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:29:17
   |
27 |     print(index)
28 |
29 | for index, _ in enumerate(books, start=x):
   |                 ^^^^^^^^^
30 |     print(book)
   |
help: Replace with `range(len(...))`

FURB148 `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:32:17
   |
30 |     print(book)
31 |
32 | for index, _ in enumerate(books, x):
   |                 ^^^^^^^^^
33 |     print(book)
   |
help: Replace with `range(len(...))`

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:35:16
   |
33 |     print(book)
34 |
35 | for _, book in enumerate(books):
   |                ^^^^^^^^^
36 |     print(book)
   |
help: Remove `enumerate`
   |
34 |
   - for _, book in enumerate(books):
35 + for book in books:
36 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:38:16
   |
36 |     print(book)
37 |
38 | for _, book in enumerate(books, start=0):
   |                ^^^^^^^^^
39 |     print(book)
   |
help: Remove `enumerate`
   |
37 |
   - for _, book in enumerate(books, start=0):
38 + for book in books:
39 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:41:16
   |
39 |     print(book)
40 |
41 | for _, book in enumerate(books, 0):
   |                ^^^^^^^^^
42 |     print(book)
   |
help: Remove `enumerate`
   |
40 |
   - for _, book in enumerate(books, 0):
41 + for book in books:
42 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:44:16
   |
42 |     print(book)
43 |
44 | for _, book in enumerate(books, start=1):
   |                ^^^^^^^^^
45 |     print(book)
   |
help: Remove `enumerate`
   |
43 |
   - for _, book in enumerate(books, start=1):
44 + for book in books:
45 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:47:16
   |
45 |     print(book)
46 |
47 | for _, book in enumerate(books, 1):
   |                ^^^^^^^^^
48 |     print(book)
   |
help: Remove `enumerate`
   |
46 |
   - for _, book in enumerate(books, 1):
47 + for book in books:
48 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:50:16
   |
48 |     print(book)
49 |
50 | for _, book in enumerate(books, start=x):
   |                ^^^^^^^^^
51 |     print(book)
   |
help: Remove `enumerate`
   |
49 |
   - for _, book in enumerate(books, start=x):
50 + for book in books:
51 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:53:16
   |
51 |     print(book)
52 |
53 | for _, book in enumerate(books, x):
   |                ^^^^^^^^^
54 |     print(book)
   |
help: Remove `enumerate`
   |
52 |
   - for _, book in enumerate(books, x):
53 + for book in books:
54 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:56:22
   |
54 |     print(book)
55 |
56 | for index, (_, _) in enumerate(books):
   |                      ^^^^^^^^^
57 |     print(index)
   |
help: Replace with `range(len(...))`
   |
55 |
   - for index, (_, _) in enumerate(books):
56 + for index in range(len(books)):
57 |     print(index)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:59:21
   |
57 |     print(index)
58 |
59 | for (_, _), book in enumerate(books):
   |                     ^^^^^^^^^
60 |     print(book)
   |
help: Remove `enumerate`
   |
58 |
   - for (_, _), book in enumerate(books):
59 + for book in books:
60 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:62:17
   |
60 |     print(book)
61 |
62 | for(index, _)in enumerate(books):
   |                 ^^^^^^^^^
63 |     print(index)
   |
help: Replace with `range(len(...))`
   |
61 |
   - for(index, _)in enumerate(books):
62 + for index in range(len(books)):
63 |     print(index)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:65:18
   |
63 |     print(index)
64 |
65 | for(index), _ in enumerate(books):
   |                  ^^^^^^^^^
66 |     print(index)
   |
help: Replace with `range(len(...))`
   |
64 |
   - for(index), _ in enumerate(books):
65 + for index in range(len(books)):
66 |     print(index)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:68:17
   |
66 |     print(index)
67 |
68 | for index, _ in enumerate(books_and_authors):
   |                 ^^^^^^^^^
69 |     print(index)
   |
help: Replace with `range(len(...))`
   |
67 |
   - for index, _ in enumerate(books_and_authors):
68 + for index in range(len(books_and_authors)):
69 |     print(index)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:71:16
   |
69 |     print(index)
70 |
71 | for _, book in enumerate(books_and_authors):
   |                ^^^^^^^^^
72 |     print(book)
   |
help: Remove `enumerate`
   |
70 |
   - for _, book in enumerate(books_and_authors):
71 + for book in books_and_authors:
72 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:74:17
   |
72 |     print(book)
73 |
74 | for index, _ in enumerate(books_set):
   |                 ^^^^^^^^^
75 |     print(index)
   |
help: Replace with `range(len(...))`
   |
73 |
   - for index, _ in enumerate(books_set):
74 + for index in range(len(books_set)):
75 |     print(index)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:77:16
   |
75 |     print(index)
76 |
77 | for _, book in enumerate(books_set):
   |                ^^^^^^^^^
78 |     print(book)
   |
help: Remove `enumerate`
   |
76 |
   - for _, book in enumerate(books_set):
77 + for book in books_set:
78 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` value is unused, use `for x in range(len(y))` instead
  --> FURB148.py:80:17
   |
78 |     print(book)
79 |
80 | for index, _ in enumerate(books_tuple):
   |                 ^^^^^^^^^
81 |     print(index)
   |
help: Replace with `range(len(...))`
   |
79 |
   - for index, _ in enumerate(books_tuple):
80 + for index in range(len(books_tuple)):
81 |     print(index)
   |
note: This is an unsafe fix and may change runtime behavior

FURB148 [*] `enumerate` index is unused, use `for x in y` instead
  --> FURB148.py:83:16
   |
81 |     print(index)
82 |
83 | for _, book in enumerate(books_tuple):
   |                ^^^^^^^^^
84 |     print(book)
   |
help: Remove `enumerate`
   |
82 |
   - for _, book in enumerate(books_tuple):
83 + for book in books_tuple:
84 |     print(book)
   |
note: This is an unsafe fix and may change runtime behavior
