mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[4/N] Apply py39 ruff and pyupgrade fixes (#143257)
```torch/fx/passes/annotate_getitem_nodes.py``` was changed to support the new type hinting annotations. Pull Request resolved: https://github.com/pytorch/pytorch/pull/143257 Approved by: https://github.com/justinchuby, https://github.com/albanD
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
import ctypes
|
||||
import os
|
||||
import unittest
|
||||
from typing import Tuple
|
||||
|
||||
import torch
|
||||
from torch.backends._nnapi.prepare import convert_model_to_nnapi
|
||||
@ -700,7 +699,7 @@ class TestNNAPI(TestCase):
|
||||
|
||||
def test_multi_output(self):
|
||||
class MultiModel(torch.nn.Module):
|
||||
def forward(self, lhs, rhs) -> Tuple[torch.Tensor, torch.Tensor]:
|
||||
def forward(self, lhs, rhs) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
the_sum = lhs + rhs
|
||||
the_diff = lhs - rhs
|
||||
return the_sum, the_diff
|
||||
|
Reference in New Issue
Block a user