[BE]: Update ruff to 0.11.8 (#153249)

Fixes a ton of false negatives throughout the codebase. RUFF also properly validates NOQA comments now and most of the changes are fixing typos there or removing filewide flake8 suppressions that were also silencing ruff issues.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/153249
Approved by: https://github.com/cyyever, https://github.com/albanD, https://github.com/seemethere
This commit is contained in:
Aaron Gokaslan
2025-05-12 18:30:48 +00:00
committed by PyTorch MergeBot
parent 5c3fddb9cc
commit 3555ebb63d
43 changed files with 235 additions and 188 deletions

View File

@ -19,6 +19,8 @@ ignore =
G100,G101,G200
# these ignores are from flake8-simplify. please fix or ignore with commented reason
SIM105,SIM108,SIM110,SIM111,SIM113,SIM114,SIM115,SIM116,SIM117,SIM118,SIM119,SIM12,
# SIM104 is already covered by pyupgrade ruff
SIM104,
# flake8-simplify code styles
SIM102,SIM103,SIM106,SIM112,
# TorchFix codes that don't make sense for PyTorch itself: