Skip to content

Commit

Permalink
[CodeStyle][task 9] enable Ruff UP030 rule in python/paddle/base (Pad…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaedeharai authored Oct 18, 2023
1 parent 88886a4 commit 1e63b0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ ignore = [

# Temporarily ignored
"python/paddle/base/**" = [
"UP030",
"B019", # Confirmation required
"C416",
"F821",
Expand Down
6 changes: 3 additions & 3 deletions python/paddle/base/layers/layer_function_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def infer_and_check_dtype(op_proto, *args, **kwargs):
dtype = each.dtype
elif dtype != each.dtype:
raise ValueError(
"operator {0} must input same dtype. {1} vs {2}".format(
"operator {} must input same dtype. {} vs {}".format(
op_type, dtype, each.dtype
)
)
Expand Down Expand Up @@ -337,8 +337,8 @@ def func(x, name=None):

func.__name__ = inplace_op_type
func.__doc__ = """
Inplace version of ``{0}`` API, the output Tensor will be inplaced with input ``x``.
Please refer to :ref:`api_base_layers_{1}`.
Inplace version of ``{}`` API, the output Tensor will be inplaced with input ``x``.
Please refer to :ref:`api_base_layers_{}`.
""".format(
origin_op_type, origin_op_type
)
Expand Down

0 comments on commit 1e63b0c

Please sign in to comment.