---
source: crates/ruff_linter/src/rules/flake8_comprehensions/mod.rs
---
C417 [*] Unnecessary `map()` usage (rewrite using a generator expression)
 --> C417_1.py:7:10
  |
5 | def overshadowed_list():
6 |     list = ...
7 |     list(map(lambda x: x, []))
  |          ^^^^^^^^^^^^^^^^^^^^
  |
help: Replace `map()` with a generator expression
  |
6 |     list = ...
  -     list(map(lambda x: x, []))
7 +     list((x for x in []))
8 |
  |
note: This is an unsafe fix and may change runtime behavior
