Commit 4256c5d
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 057e6f6 commit 4256c5d
1 file changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1567 | 1567 | | |
1568 | 1568 | | |
1569 | 1569 | | |
1570 | | - | |
1571 | | - | |
1572 | | - | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
1577 | | - | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
1578 | 1576 | | |
1579 | 1577 | | |
1580 | 1578 | | |
| |||
0 commit comments