[BE]: Update mypy to 1.11.2 (#133816)

Updates mypy to 1.11.1 to improve type inference

Pull Request resolved: https://github.com/pytorch/pytorch/pull/133816
Approved by: https://github.com/ezyang
This commit is contained in:
Aaron Gokaslan
2024-09-14 21:40:34 +00:00
committed by PyTorch MergeBot
parent c64ae601ba
commit 55299cfc22
56 changed files with 185 additions and 180 deletions

View File

@ -295,7 +295,7 @@ class SparseSemiStructuredTensor(torch.Tensor):
else:
return dense_input
def to_dense(self):
def to_dense(self): # type:ignore[override]
col = self.shape[-1]
return torch.mm(self, torch.eye(col, dtype=self.dtype, device=self.device))
@ -420,7 +420,7 @@ class SparseSemiStructuredTensorCUTLASS(SparseSemiStructuredTensor):
requires_grad=original_tensor.requires_grad,
)
def to_dense(self):
def to_dense(self): # type: ignore[override]
assert self.meta is not None and self.packed is not None
return (
sparse_semi_structured_to_dense_cutlass(