---
source: crates/ruff_linter/src/rules/refurb/mod.rs
---
FURB140 [*] Use `itertools.starmap` instead of the generator
 --> FURB140.py:7:1
  |
6 | # FURB140
7 | [print(x, y) for x, y in zipped()]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8 |
9 | # FURB140
  |
help: Replace with `itertools.starmap`
  |
1 + from itertools import starmap
2 | def zipped():
--------------------------------------------------------------------------------
7 | # FURB140
  - [print(x, y) for x, y in zipped()]
8 + list(starmap(print, zipped()))
9 |
  |

FURB140 [*] Use `itertools.starmap` instead of the generator
  --> FURB140.py:10:1
   |
 9 | # FURB140
10 | (print(x, y) for x, y in zipped())
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 |
12 | # FURB140
   |
help: Replace with `itertools.starmap`
   |
1  + from itertools import starmap
2  | def zipped():
--------------------------------------------------------------------------------
10 | # FURB140
   - (print(x, y) for x, y in zipped())
11 + starmap(print, zipped())
12 |
   |

FURB140 [*] Use `itertools.starmap` instead of the generator
  --> FURB140.py:13:1
   |
12 | # FURB140
13 | {print(x, y) for x, y in zipped()}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: Replace with `itertools.starmap`
   |
1  + from itertools import starmap
2  | def zipped():
--------------------------------------------------------------------------------
13 | # FURB140
   - {print(x, y) for x, y in zipped()}
14 + set(starmap(print, zipped()))
15 |
   |

FURB140 [*] Use `itertools.starmap` instead of the generator
  --> FURB140.py:19:1
   |
18 | # FURB140
19 | [print(x, y) for x, y in zipped()]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 |
21 | # FURB140
   |
help: Replace with `itertools.starmap`
   |
18 | # FURB140
   - [print(x, y) for x, y in zipped()]
19 + list(sm(print, zipped()))
20 |
   |

FURB140 [*] Use `itertools.starmap` instead of the generator
  --> FURB140.py:22:1
   |
21 | # FURB140
22 | (print(x, y) for x, y in zipped())
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 |
24 | # FURB140
   |
help: Replace with `itertools.starmap`
   |
21 | # FURB140
   - (print(x, y) for x, y in zipped())
22 + sm(print, zipped())
23 |
   |

FURB140 [*] Use `itertools.starmap` instead of the generator
  --> FURB140.py:25:1
   |
24 | # FURB140
25 | {print(x, y) for x, y in zipped()}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 |
27 | # FURB140 (check it still flags starred arguments).
   |
help: Replace with `itertools.starmap`
   |
24 | # FURB140
   - {print(x, y) for x, y in zipped()}
25 + set(sm(print, zipped()))
26 |
   |

FURB140 [*] Use `itertools.starmap` instead of the generator
  --> FURB140.py:29:1
   |
27 | # FURB140 (check it still flags starred arguments).
28 | # See https://github.com/astral-sh/ruff/issues/7636
29 | [foo(*t) for t in [(85, 60), (100, 80)]]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 | (foo(*t) for t in [(85, 60), (100, 80)])
31 | {foo(*t) for t in [(85, 60), (100, 80)]}
   |
help: Replace with `itertools.starmap`
   |
28 | # See https://github.com/astral-sh/ruff/issues/7636
   - [foo(*t) for t in [(85, 60), (100, 80)]]
29 + list(sm(foo, [(85, 60), (100, 80)]))
30 | (foo(*t) for t in [(85, 60), (100, 80)])
   |

FURB140 [*] Use `itertools.starmap` instead of the generator
  --> FURB140.py:30:1
   |
28 | # See https://github.com/astral-sh/ruff/issues/7636
29 | [foo(*t) for t in [(85, 60), (100, 80)]]
30 | (foo(*t) for t in [(85, 60), (100, 80)])
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 | {foo(*t) for t in [(85, 60), (100, 80)]}
   |
help: Replace with `itertools.starmap`
   |
29 | [foo(*t) for t in [(85, 60), (100, 80)]]
   - (foo(*t) for t in [(85, 60), (100, 80)])
30 + sm(foo, [(85, 60), (100, 80)])
31 | {foo(*t) for t in [(85, 60), (100, 80)]}
   |

FURB140 [*] Use `itertools.starmap` instead of the generator
  --> FURB140.py:31:1
   |
29 | [foo(*t) for t in [(85, 60), (100, 80)]]
30 | (foo(*t) for t in [(85, 60), (100, 80)])
31 | {foo(*t) for t in [(85, 60), (100, 80)]}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 |
33 | # Non-errors.
   |
help: Replace with `itertools.starmap`
   |
30 | (foo(*t) for t in [(85, 60), (100, 80)])
   - {foo(*t) for t in [(85, 60), (100, 80)]}
31 + set(sm(foo, [(85, 60), (100, 80)]))
32 |
   |

FURB140 [*] Use `itertools.starmap` instead of the generator
  --> FURB140.py:62:5
   |
61 |   all(
62 | /     predicate(a, b)
63 | |     # text
64 | |     for a, b
65 | |     # text
66 | |     in some_iterable
   | |____________________^
67 |   )
   |
help: Replace with `itertools.starmap`
   |
61 | all(
   -     predicate(a, b)
   -     # text
   -     for a, b
   -     # text
   -     in some_iterable
62 +     sm(predicate, some_iterable)
63 | )
   |
note: This is an unsafe fix and may change runtime behavior
