[BE][Ez]: Update ruff to 0.12.2 (#157937)

Updates to the latest version of ruff and apply some fixes that it flagged and silence a few new lints

Pull Request resolved: https://github.com/pytorch/pytorch/pull/157937
Approved by: https://github.com/ezyang
This commit is contained in:
Aaron Gokaslan
2025-07-11 15:16:20 +00:00
committed by PyTorch MergeBot
parent 0d17029fea
commit 7a08755c5f
5 changed files with 18 additions and 9 deletions

View File

@ -6648,7 +6648,7 @@ class TestQuantizeFx(QuantizationTestCase):
"""
def __init__(self, input_dim, output_dim):
super(__class__, self).__init__()
super().__init__()
self.w = nn.Parameter(torch.randn(input_dim, output_dim))
self.b = nn.Parameter(torch.randn(input_dim))
@ -6661,7 +6661,7 @@ class TestQuantizeFx(QuantizationTestCase):
"""
def __init__(self, input_dim, hidden_dim, output_dim):
super(__class__, self).__init__()
super().__init__()
self.submodule_1 = SubModule(hidden_dim, input_dim)
setattr(self, 'submodule|2', SubModule(hidden_dim, hidden_dim))
setattr(self, 'submodule/3', SubModule(hidden_dim, hidden_dim))