---
source: crates/ruff_linter/src/rules/flake8_comprehensions/mod.rs
---
C410 [*] Unnecessary list literal passed to `list()` (remove the outer call to `list()`)
 --> C410.py:1:6
  |
1 | l1 = list([1, 2])
  |      ^^^^^^^^^^^^
2 | l2 = list((1, 2))
3 | l3 = list([])
  |
help: Remove outer `list()` call
  |
  - l1 = list([1, 2])
1 + l1 = [1, 2]
2 | l2 = list((1, 2))
  |
note: This is an unsafe fix and may change runtime behavior

C410 [*] Unnecessary tuple literal passed to `list()` (rewrite as a single list literal)
 --> C410.py:2:6
  |
1 | l1 = list([1, 2])
2 | l2 = list((1, 2))
  |      ^^^^^^^^^^^^
3 | l3 = list([])
4 | l4 = list(())
  |
help: Rewrite as a single list literal
  |
1 | l1 = list([1, 2])
  - l2 = list((1, 2))
2 + l2 = [1, 2]
3 | l3 = list([])
  |
note: This is an unsafe fix and may change runtime behavior

C410 [*] Unnecessary list literal passed to `list()` (remove the outer call to `list()`)
 --> C410.py:3:6
  |
1 | l1 = list([1, 2])
2 | l2 = list((1, 2))
3 | l3 = list([])
  |      ^^^^^^^^
4 | l4 = list(())
  |
help: Remove outer `list()` call
  |
2 | l2 = list((1, 2))
  - l3 = list([])
3 + l3 = []
4 | l4 = list(())
  |
note: This is an unsafe fix and may change runtime behavior

C410 [*] Unnecessary tuple literal passed to `list()` (rewrite as a single list literal)
 --> C410.py:4:6
  |
2 | l2 = list((1, 2))
3 | l3 = list([])
4 | l4 = list(())
  |      ^^^^^^^^
  |
help: Rewrite as a single list literal
  |
3 | l3 = list([])
  - l4 = list(())
4 + l4 = []
5 |
  |
note: This is an unsafe fix and may change runtime behavior

C410 [*] Unnecessary list literal passed to `list()` (remove the outer call to `list()`)
  --> C410.py:7:1
   |
 7 | / list(  # comment
 8 | |     [1, 2]
 9 | | )
   | |_^
10 |
11 |   list([  # comment
   |
help: Remove outer `list()` call
  |
6 |
  - list(  # comment
  -     [1, 2]
  - )
7 + [1, 2]
8 |
  |
note: This is an unsafe fix and may change runtime behavior

C410 [*] Unnecessary list literal passed to `list()` (remove the outer call to `list()`)
  --> C410.py:11:1
   |
 9 |   )
10 |
11 | / list([  # comment
12 | |     1, 2
13 | | ])
   | |__^
14 |
15 |   # Skip when too many positional arguments
   |
help: Remove outer `list()` call
   |
10 |
   - list([  # comment
11 + [  # comment
12 |     1, 2
   - ])
13 + ]
14 |
   |
note: This is an unsafe fix and may change runtime behavior
