[BE][Easy] enable ruff rule PIE790: unnecessary pass statement (#133200)

This PR removes unnecessary `pass` statement. This is semanticly safe because the bytecode for the Python code does not change.

Note that if there is a docstring in the function, a empty function does not need a `pass` statement as placeholder.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/133200
Approved by: https://github.com/malfet, https://github.com/eqy, https://github.com/kit1980
This commit is contained in:
Xuehai Pan
2024-08-15 19:29:29 +08:00
committed by PyTorch MergeBot
parent 57d1ffc512
commit 758a0a88a2
87 changed files with 2 additions and 176 deletions

View File

@ -445,7 +445,6 @@ def retries_decorator(
print(
f'Attempt {idx} of {num_retries} to call {f.__name__} failed with "{e}"'
)
pass
return cast(T, rc)
return wrapper