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 20] enable ruff B011 rule in python/paddle/base #57376

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -117,7 +117,6 @@ ignore = [
"C403",
"F811",
"UP034",
"B011",
"C405",
"C417",
"PLR0402",
Expand Down
6 changes: 4 additions & 2 deletions python/paddle/base/incubate/checkpoint/auto_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def _get_last_valid_checkpoint(self):
"load tain_epoch_range checkpoint:{}".format(self._serialize())
)
else:
assert False, "not supported acp_type:{}".format(g_acp_type)
raise AssertionError("not supported acp_type:{}".format(g_acp_type))

def _to_dict(self):
d = {
Expand Down Expand Up @@ -503,7 +503,9 @@ def save_checkpoint(self):
elif g_acp_type == CONST_DACP_TYPE:
self._save_checkpoint()
else:
assert False, "not supported acp_type:{}".format(g_acp_type)
raise AssertionError(
"not supported acp_type:{}".format(g_acp_type)
)
self._last_checkpoint_time = time.time()

def _save_checkpoint(self):
Expand Down