Skip to content

Commit

Permalink
[CodeStyle][task 30] enable ruff C411 rule in python/paddle/base (Pad…
Browse files Browse the repository at this point in the history
…dlePaddle#57707)

* Update pyproject.toml

* fix bug
  • Loading branch information
longranger2 authored and jiahy0825 committed Oct 16, 2023
1 parent 1b8c192 commit d85a0df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ ignore = [
"UP030",
"C405",
"B019", # Confirmation required
"C411",
"C416",
"F821",
"PLC0414",
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/base/backward.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ def _op_can_be_removed_(op_desc, no_grad_set):
] = grad_op_id_to_fwd_op[op_desc.original_id()]
to_insert.append((new_op_desc, idx))

list([op_descs.insert(p[1], p[0]) for p in reversed(to_insert)])
[op_descs.insert(p[1], p[0]) for p in reversed(to_insert)]

return op_descs

Expand Down

0 comments on commit d85a0df

Please sign in to comment.