[1/N] Fix ruff warnings (#164333)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164333
Approved by: https://github.com/albanD
This commit is contained in:
Yuanyuan Chen
2025-10-01 16:48:29 +00:00
committed by PyTorch MergeBot
parent e419dc6d08
commit f7ab8a2710
26 changed files with 32 additions and 63 deletions

View File

@ -247,7 +247,7 @@ def _vector_str(self, indent, summarize, formatter1, formatter2=None):
element_length += formatter2.width() + 1
elements_per_line = max(
1, int(math.floor((PRINT_OPTS.linewidth - indent) / (element_length)))
1, math.floor((PRINT_OPTS.linewidth - indent) / (element_length))
)
def _val_formatter(val, formatter1=formatter1, formatter2=formatter2):