Commit 5b0f400
Replace list(map(...)) constructs by list comprehensions (#46461)
Summary:
As discussed in #46392 this makes the code more readable and possibly more performant.
It also fixes a bug detected by this where the argument order of `map` was confused: Flamefire@030a249#diff-5bb26bd3a23ee3bb540aeadcc0385df2a4e48de39f87ed9ea76b21990738fe98L1537-R1537
Fixes #46392
Pull Request resolved: #46461
Reviewed By: ailzhang
Differential Revision: D24367015
Pulled By: ezyang
fbshipit-source-id: d55a67933cc22346b00544c9671f09982ad920e71 parent 3d421b3 commit 5b0f400
File tree
25 files changed
+63
-63
lines changed- .circleci/cimodel/data/simple/util
- caffe2/python
- operator_test
- test
- jit
- onnx
- tools/codegen
- torch
- jit
- nn/parallel
- optim
- testing/_internal/distributed
- utils
25 files changed
+63
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
951 | | - | |
| 951 | + | |
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
955 | | - | |
| 955 | + | |
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
| 389 | + | |
| 390 | + | |
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2959 | 2959 | | |
2960 | 2960 | | |
2961 | 2961 | | |
2962 | | - | |
| 2962 | + | |
2963 | 2963 | | |
2964 | | - | |
| 2964 | + | |
2965 | 2965 | | |
2966 | 2966 | | |
2967 | 2967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8030 | 8030 | | |
8031 | 8031 | | |
8032 | 8032 | | |
8033 | | - | |
| 8033 | + | |
8034 | 8034 | | |
8035 | 8035 | | |
8036 | 8036 | | |
| |||
0 commit comments