mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[BE]: Update Ruff to 0.0.280 (#105724)
Removes unusued loop values in python dictionary iteration. Automated fix from Ruff master Pull Request resolved: https://github.com/pytorch/pytorch/pull/105724 Approved by: https://github.com/ezyang, https://github.com/janeyx99
This commit is contained in:
committed by
PyTorch MergeBot
parent
53a4b262d2
commit
6d43c89f37
@ -14053,23 +14053,19 @@ for unary_base_func_name in (
|
||||
if hasattr(torch, unary_foreach_func_name):
|
||||
add_docstr(
|
||||
getattr(torch, unary_foreach_func_name),
|
||||
r"""
|
||||
{}(self: List[Tensor]) -> List[Tensor]
|
||||
rf"""
|
||||
{unary_foreach_func_name}(self: List[Tensor]) -> List[Tensor]
|
||||
|
||||
Apply :func:`torch.{}` to each Tensor of the input list.
|
||||
""".format(
|
||||
unary_foreach_func_name, unary_base_func_name
|
||||
),
|
||||
Apply :func:`torch.{unary_base_func_name}` to each Tensor of the input list.
|
||||
""",
|
||||
)
|
||||
unary_inplace_foreach_func_name = f"{unary_foreach_func_name}_"
|
||||
if hasattr(torch, unary_inplace_foreach_func_name):
|
||||
add_docstr(
|
||||
getattr(torch, unary_inplace_foreach_func_name),
|
||||
r"""
|
||||
{}(self: List[Tensor]) -> None
|
||||
rf"""
|
||||
{unary_inplace_foreach_func_name}(self: List[Tensor]) -> None
|
||||
|
||||
Apply :func:`torch.{}` to each Tensor of the input list.
|
||||
""".format(
|
||||
unary_inplace_foreach_func_name, unary_base_func_name
|
||||
),
|
||||
Apply :func:`torch.{unary_base_func_name}` to each Tensor of the input list.
|
||||
""",
|
||||
)
|
||||
|
Reference in New Issue
Block a user