---
source: crates/ruff/src/rules/flake8_comprehensions/mod.rs
---
C404.py:1:1: C404 [*] Unnecessary `list` comprehension (rewrite as a `dict` comprehension)
  |
1 | dict([(i, i) for i in range(3)])
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C404
2 | dict([(i, i) for i in range(3)], z=4)
  |
  = help: Rewrite as a `dict` comprehension

ℹ Suggested fix
1   |-dict([(i, i) for i in range(3)])
  1 |+{i: i for i in range(3)}
2 2 | dict([(i, i) for i in range(3)], z=4)


