Add None return type to init -- tests rest (#132376)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/132376
Approved by: https://github.com/jamesjwu
ghstack dependencies: #132335, #132351, #132352
This commit is contained in:
Oguz Ulgen
2024-08-01 00:22:48 -07:00
committed by PyTorch MergeBot
parent 221350e3a4
commit 920f0426ae
136 changed files with 911 additions and 911 deletions

View File

@ -31,17 +31,17 @@ class TestBuiltins(JitTestCase):
def test_has_attr(self):
class HasA(torch.nn.Module):
def __init__(self):
def __init__(self) -> None:
super().__init__()
self.a = 0
class HasB(torch.nn.Module):
def __init__(self):
def __init__(self) -> None:
super().__init__()
self.b = 1
class Mod(torch.nn.Module):
def __init__(self):
def __init__(self) -> None:
super().__init__()
self.mods = torch.nn.ModuleList([HasA(), HasB()])
@ -62,7 +62,7 @@ class TestBuiltins(JitTestCase):
def test_has_attr_invalid_args(self):
class Mod(torch.nn.Module):
def __init__(self):
def __init__(self) -> None:
super().__init__()
self.mod = torch.nn.Linear(1, 1)