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 9] enable Ruff UP030 rule in python/paddle/base #58162

Merged
merged 1 commit into from
Oct 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 @@ -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