Commit b586346
committed
R1717: Consider using a dictionary comprehension
Emitted when we detect the creation of a dictionary using the dict()
callable and a transient list. Although there is nothing syntactically
wrong with this code, it is hard to read and can be simplified to a dict
comprehension. Also it is faster since you don't need to create another
transient list.1 parent 27772a0 commit b586346
1 file changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1583 | 1583 | | |
1584 | 1584 | | |
1585 | 1585 | | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
1594 | 1592 | | |
1595 | 1593 | | |
1596 | 1594 | | |
| |||
0 commit comments