Skip to content

Commit d89eb8f

Browse files
Appease mypy
1 parent 3a4619e commit d89eb8f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pytensor/sparse/sharedvar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pytensor.tensor.sharedvar import TensorSharedVariable
88

99

10-
class SparseTensorSharedVariable(TensorSharedVariable, SparseVariable):
10+
class SparseTensorSharedVariable(TensorSharedVariable, SparseVariable): # type: ignore[misc]
1111
@property
1212
def format(self):
1313
return self.type.format

pytensor/sparse/variable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def dimshuffle(self, *pattern):
421421
raise NotImplementedError
422422

423423

424-
class SparseVariable(_sparse_py_operators, TensorVariable):
424+
class SparseVariable(_sparse_py_operators, TensorVariable): # type: ignore[misc]
425425
format = property(lambda self: self.type.format)
426426

427427
def __str__(self):
@@ -454,7 +454,7 @@ def pytensor_hash(self):
454454
return hash_from_sparse(d)
455455

456456

457-
class SparseConstant(SparseVariable, TensorConstant):
457+
class SparseConstant(SparseVariable, TensorConstant): # type: ignore[misc]
458458
format = property(lambda self: self.type.format)
459459

460460
def signature(self):

pytensor/tensor/slinalg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ def _largest_common_dtype(tensors: Sequence[TensorVariable]) -> np.dtype:
16541654

16551655

16561656
class BaseBlockDiagonal(Op):
1657-
__props__ = ("n_inputs",)
1657+
__props__: tuple[str, ...] = ("n_inputs",)
16581658

16591659
def __init__(self, n_inputs):
16601660
input_sig = ",".join(f"(m{i},n{i})" for i in range(n_inputs))

0 commit comments

Comments
 (0)