Skip to content

Commit 24efee4

Browse files
committed
fix: type assignment exception
1 parent 38147b7 commit 24efee4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/nifreeze/estimator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def run(self, dataset: DatasetT, **kwargs) -> Self:
9999
if self._prev is not None:
100100
result = self._prev.run(dataset, **kwargs)
101101
if isinstance(self._prev, Filter):
102-
dataset = result
102+
dataset = result # type: ignore[assignment]
103103

104104
n_jobs = kwargs.get("n_jobs", None)
105105

src/nifreeze/model/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class BaseModel:
8484
8585
"""
8686

87-
__slots__ = ("_dataset", )
87+
__slots__ = ("_dataset",)
8888

8989
def __init__(self, dataset, **kwargs):
9090
"""Base initialization."""
@@ -103,7 +103,7 @@ def fit_predict(self, index, **kwargs) -> np.ndarray:
103103
class TrivialModel(BaseModel):
104104
"""A trivial model that returns a given map always."""
105105

106-
__slots__ = ("_predicted", )
106+
__slots__ = ("_predicted",)
107107

108108
def __init__(self, dataset, predicted=None, **kwargs):
109109
"""Implement object initialization."""
@@ -129,7 +129,7 @@ def fit_predict(self, *_, **kwargs):
129129
class ExpectationModel(BaseModel):
130130
"""A trivial model that returns an expectation map (for example, average)."""
131131

132-
__slots__ = ("_stat", )
132+
__slots__ = ("_stat",)
133133

134134
def __init__(self, dataset, stat="median", **kwargs):
135135
"""Initialize a new model."""

0 commit comments

Comments
 (0)