---
source: crates/ruff_linter/src/rules/pyflakes/mod.rs
---
F602 Dictionary key `a` repeated
 --> F602.py:5:5
  |
3 | x = {
4 |     a: 1,
5 |     a: 2,
  |     ^
6 |     b: 3,
7 | }
  |
help: Remove repeated key `a`

F602 Dictionary key `a` repeated
  --> F602.py:11:5
   |
 9 | x = {
10 |     a: 1,
11 |     a: 2,
   |     ^
12 |     a: 3,
13 |     a: 3,
   |
help: Remove repeated key `a`

F602 Dictionary key `a` repeated
  --> F602.py:12:5
   |
10 |     a: 1,
11 |     a: 2,
12 |     a: 3,
   |     ^
13 |     a: 3,
14 | }
   |
help: Remove repeated key `a`

F602 [*] Dictionary key `a` repeated
  --> F602.py:13:5
   |
11 |     a: 2,
12 |     a: 3,
13 |     a: 3,
   |     ^
14 | }
   |
help: Remove repeated key `a`
   |
12 |     a: 3,
   -     a: 3,
13 | }
   |
note: This is an unsafe fix and may change runtime behavior

F602 Dictionary key `a` repeated
  --> F602.py:18:5
   |
16 | x = {
17 |     a: 1,
18 |     a: 2,
   |     ^
19 |     a: 3,
20 |     a: 3,
   |
help: Remove repeated key `a`

F602 Dictionary key `a` repeated
  --> F602.py:19:5
   |
17 |     a: 1,
18 |     a: 2,
19 |     a: 3,
   |     ^
20 |     a: 3,
21 |     a: 4,
   |
help: Remove repeated key `a`

F602 [*] Dictionary key `a` repeated
  --> F602.py:20:5
   |
18 |     a: 2,
19 |     a: 3,
20 |     a: 3,
   |     ^
21 |     a: 4,
22 | }
   |
help: Remove repeated key `a`
   |
19 |     a: 3,
   -     a: 3,
20 |     a: 4,
   |
note: This is an unsafe fix and may change runtime behavior

F602 Dictionary key `a` repeated
  --> F602.py:21:5
   |
19 |     a: 3,
20 |     a: 3,
21 |     a: 4,
   |     ^
22 | }
   |
help: Remove repeated key `a`

F602 [*] Dictionary key `a` repeated
  --> F602.py:26:5
   |
24 | x = {
25 |     a: 1,
26 |     a: 1,
   |     ^
27 |     a: 2,
28 |     a: 3,
   |
help: Remove repeated key `a`
   |
25 |     a: 1,
   -     a: 1,
26 |     a: 2,
   |
note: This is an unsafe fix and may change runtime behavior

F602 Dictionary key `a` repeated
  --> F602.py:27:5
   |
25 |     a: 1,
26 |     a: 1,
27 |     a: 2,
   |     ^
28 |     a: 3,
29 |     a: 4,
   |
help: Remove repeated key `a`

F602 Dictionary key `a` repeated
  --> F602.py:28:5
   |
26 |     a: 1,
27 |     a: 2,
28 |     a: 3,
   |     ^
29 |     a: 4,
30 | }
   |
help: Remove repeated key `a`

F602 Dictionary key `a` repeated
  --> F602.py:29:5
   |
27 |     a: 2,
28 |     a: 3,
29 |     a: 4,
   |     ^
30 | }
   |
help: Remove repeated key `a`

F602 [*] Dictionary key `a` repeated
  --> F602.py:35:5
   |
33 |     a: 1,
34 |     "a": 1,
35 |     a: 1,
   |     ^
36 |     "a": 2,
37 |     a: 2,
   |
help: Remove repeated key `a`
   |
34 |     "a": 1,
   -     a: 1,
35 |     "a": 2,
   |
note: This is an unsafe fix and may change runtime behavior

F602 Dictionary key `a` repeated
  --> F602.py:37:5
   |
35 |     a: 1,
36 |     "a": 2,
37 |     a: 2,
   |     ^
38 |     "a": 3,
39 |     a: 3,
   |
help: Remove repeated key `a`

F602 Dictionary key `a` repeated
  --> F602.py:39:5
   |
37 |     a: 2,
38 |     "a": 3,
39 |     a: 3,
   |     ^
40 |     "a": 3,
41 |     a: 4,
   |
help: Remove repeated key `a`

F602 Dictionary key `a` repeated
  --> F602.py:41:5
   |
39 |     a: 3,
40 |     "a": 3,
41 |     a: 4,
   |     ^
42 | }
   |
help: Remove repeated key `a`

F602 [*] Dictionary key `a` repeated
  --> F602.py:44:12
   |
42 | }
43 |
44 | x = {a: 1, a: 1}
   |            ^
45 | x = {a: 1, b: 2, a: 1}
   |
help: Remove repeated key `a`
   |
43 |
   - x = {a: 1, a: 1}
44 + x = {a: 1}
45 | x = {a: 1, b: 2, a: 1}
   |
note: This is an unsafe fix and may change runtime behavior

F602 [*] Dictionary key `a` repeated
  --> F602.py:45:18
   |
44 | x = {a: 1, a: 1}
45 | x = {a: 1, b: 2, a: 1}
   |                  ^
   |
help: Remove repeated key `a`
   |
44 | x = {a: 1, a: 1}
   - x = {a: 1, b: 2, a: 1}
45 + x = {a: 1, b: 2}
   |
note: This is an unsafe fix and may change runtime behavior
