Skip to content

Commit e9bb0df

Browse files
committed
STY: Avoid shadowing outer variables in PET test private class
Avoid shadowing outer variables in PET test private class: add a leading underscore to the dummy private class attribute.
1 parent a971d0a commit e9bb0df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_pet_workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ def test_pet_motion_estimator_run(monkeypatch):
4747
ds = _pet_dataset(3)
4848

4949
class DummyModel:
50-
def __init__(self, dataset):
51-
self.dataset = dataset
50+
def __init__(self, _dataset):
51+
self._dataset = _dataset
5252

5353
def fit_predict(self, index):
5454
if index is None:
5555
return None
56-
return np.zeros(self.dataset.shape3d, dtype=np.float32)
56+
return np.zeros(self._dataset.shape3d, dtype=np.float32)
5757

5858
monkeypatch.setattr("nifreeze.estimator.PETModel", DummyModel)
5959

0 commit comments

Comments
 (0)