未验证 提交 b811043a 编写于 作者: 张春乔 提交者: GitHub

[CodeStyle][C411] replace list() with [] (#52057)

上级 bf1771d0
......@@ -39,7 +39,7 @@ select = [
"C408",
"C409",
"C410",
# "C411",
"C411",
# "C413",
# "C414",
# "C415",
......
......@@ -1483,15 +1483,15 @@ class Resharder:
[source_partition_index, [source_process], [False]]
)
else:
partition_list = list(
[item[0] for item in partition_process_mapping_list]
)
process_list = list(
[item[1] for item in partition_process_mapping_list]
)
has_used = list(
[item[2] for item in partition_process_mapping_list]
)
partition_list = [
item[0] for item in partition_process_mapping_list
]
process_list = [
item[1] for item in partition_process_mapping_list
]
has_used = [
item[2] for item in partition_process_mapping_list
]
if partition_list.count(source_partition_index) == 1:
index = partition_list.index(source_partition_index)
......@@ -1536,15 +1536,15 @@ class Resharder:
)
and source_partition_index not in has_sent
):
idx = list(
[item[0] for item in partition_process_mapping_list]
).index(source_partition_index)
has_used = list(
[item[2] for item in partition_process_mapping_list]
)[idx]
process_list = list(
[item[1] for item in partition_process_mapping_list]
)[idx]
idx = [
item[0] for item in partition_process_mapping_list
].index(source_partition_index)
has_used = [
item[2] for item in partition_process_mapping_list
][idx]
process_list = [
item[1] for item in partition_process_mapping_list
][idx]
i = 0
while i < len(has_used):
if not has_used[i]:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册