---
source: crates/ruff/src/rules/flake8_comprehensions/mod.rs
---
C410.py:1:6: C410 [*] Unnecessary `list` literal passed to `list()` (remove the outer call to `list()`)
  |
1 | l1 = list([1, 2])
  |      ^^^^^^^^^^^^ C410
2 | l2 = list((1, 2))
3 | l3 = list([])
  |
  = help: Remove outer `list` call

ℹ Suggested fix
1   |-l1 = list([1, 2])
  1 |+l1 = [1, 2]
2 2 | l2 = list((1, 2))
3 3 | l3 = list([])
4 4 | l4 = list(())

C410.py:2:6: C410 [*] Unnecessary `tuple` literal passed to `list()` (rewrite as a `list` literal)
  |
2 | l1 = list([1, 2])
3 | l2 = list((1, 2))
  |      ^^^^^^^^^^^^ C410
4 | l3 = list([])
5 | l4 = list(())
  |
  = help: Rewrite as a `list` literal

ℹ Suggested fix
1 1 | l1 = list([1, 2])
2   |-l2 = list((1, 2))
  2 |+l2 = [1, 2]
3 3 | l3 = list([])
4 4 | l4 = list(())

C410.py:3:6: C410 [*] Unnecessary `list` literal passed to `list()` (remove the outer call to `list()`)
  |
3 | l1 = list([1, 2])
4 | l2 = list((1, 2))
5 | l3 = list([])
  |      ^^^^^^^^ C410
6 | l4 = list(())
  |
  = help: Remove outer `list` call

ℹ Suggested fix
1 1 | l1 = list([1, 2])
2 2 | l2 = list((1, 2))
3   |-l3 = list([])
  3 |+l3 = []
4 4 | l4 = list(())

C410.py:4:6: C410 [*] Unnecessary `tuple` literal passed to `list()` (rewrite as a `list` literal)
  |
4 | l2 = list((1, 2))
5 | l3 = list([])
6 | l4 = list(())
  |      ^^^^^^^^ C410
  |
  = help: Rewrite as a `list` literal

ℹ Suggested fix
1 1 | l1 = list([1, 2])
2 2 | l2 = list((1, 2))
3 3 | l3 = list([])
4   |-l4 = list(())
  4 |+l4 = []


