mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Update to using mypy 1.15 (#154054)
The BC break isn't real - mypy decided to start complaining about the way we were typing that function. Pull Request resolved: https://github.com/pytorch/pytorch/pull/154054 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
76ed9db468
commit
6503b4a96e
@ -3747,14 +3747,14 @@ class TestCase(expecttest.TestCase):
|
||||
if target is None:
|
||||
target = batch_data[layout] = (ext_coo_indices1, d[1])
|
||||
else:
|
||||
target[0].set_(torch.cat((target[0], ext_coo_indices1), 1))
|
||||
target[0].set_(torch.cat((target[0], ext_coo_indices1), 1)) # type: ignore[call-overload]
|
||||
target[1].set_(torch.cat((target[1], d[1])))
|
||||
else:
|
||||
if target is None:
|
||||
target = batch_data[layout] = tuple(d[j].unsqueeze(0) for j in range(len(d)))
|
||||
else:
|
||||
for j in range(len(d)):
|
||||
target[j].set_(torch.cat((target[j], d[j].unsqueeze(0))))
|
||||
target[j].set_(torch.cat((target[j], d[j].unsqueeze(0)))) # type: ignore[call-overload]
|
||||
return batch_data
|
||||
|
||||
def generate_values(base, densesize):
|
||||
|
Reference in New Issue
Block a user