[BE] fix remaining flake8 v7 warnings (#159044)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/159044
Approved by: https://github.com/Skylion007
ghstack dependencies: #159043
This commit is contained in:
Xuehai Pan
2025-07-25 01:07:16 +08:00
committed by PyTorch MergeBot
parent f903bc475c
commit f5e2de928b
24 changed files with 90 additions and 91 deletions

View File

@ -827,7 +827,7 @@ class TestFuseFx(QuantizationTestCase):
named_modules = dict(m.named_modules())
for node in m.graph.nodes:
if node.op == "call_module" and type(named_modules[node.target]) == torch.nn.Conv2d:
self.assertTrue(len(node.args) == 2), "Expecting the fused op to have two arguments"
self.assertTrue(len(node.args) == 2, msg="Expecting the fused op to have two arguments")
def test_fusion_pattern_with_matchallnode(self):
"""This test tests that the node matched by MatchAllNode will be regared as an input