Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CodeStyle][task 21] enable ruff C405 rule in python/paddle/base #58056

Merged
merged 3 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ ignore = [
# Temporarily ignored
"python/paddle/base/**" = [
"UP030",
"C405",
"B019", # Confirmation required
"C416",
"F821",
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 @@ -2067,7 +2067,7 @@ def append_backward(
# not support double grad in control flow sub-block now.
if not is_in_control_flow:
if program._appending_grad_times > 1:
input_grad_names_set = set([_append_grad_suffix_(loss.name)])
input_grad_names_set = {_append_grad_suffix_(loss.name)}

# TODO: support _append_backward_ops_with_checkpoints_ in
# sub-block (control flow)
Expand Down
1 change: 0 additions & 1 deletion python/paddle/base/multiprocess_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def _func_register(function):
if not callable(function):
raise TypeError("%s is not callable object." % (function))
# check function object whether hash-able
set([function])
if function not in cls._registered_func_set:
atexit.register(_func_exectuor)
cls._registered_func_set.add(function)
Expand Down