Skip to content

Commit

Permalink
[CodeStyle][task 27] Enable Ruff B009 rule in python/paddle/base (P…
Browse files Browse the repository at this point in the history
  • Loading branch information
linzeyang authored and jiahy0825 committed Oct 16, 2023
1 parent 2d3c0d7 commit 86233aa
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 @@ -108,7 +108,6 @@ ignore = [
"C408",
"UP030",
"C405",
"B009",
"B019", # Confirmation required
"C411",
"C416",
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/base/dygraph/tensor_patch_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ def coalesce(self, name=None):
# NOTE(zhiqiu): pybind11 will set a default __str__ method of enum class.
# So, we need to overwrite it to a more readable one.
# See details in https://github.com/pybind/pybind11/issues/2537.
origin = getattr(core.VarDesc.VarType, "__str__")
origin = core.VarDesc.VarType.__str__

def dtype_str(dtype):
if dtype in _PADDLE_DTYPE_2_NUMPY_DTYPE:
Expand Down

0 comments on commit 86233aa

Please sign in to comment.