From 102a820496d9bf3f4d63623db22c298b56ec2599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Fri, 15 Mar 2024 19:02:03 -0400 Subject: [PATCH] ENH: Remove unused parameter from method prototype Remove unused parameter from method prototype: PET images do not have a `b0` image. Use the `*_` to denote unused arguments for the `PET` class and use a `kwargs` dictionary for the `DWI` case. --- src/eddymotion/data/dmri.py | 3 ++- src/eddymotion/data/pet.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/eddymotion/data/dmri.py b/src/eddymotion/data/dmri.py index 0f407bde..2fbb2531 100644 --- a/src/eddymotion/data/dmri.py +++ b/src/eddymotion/data/dmri.py @@ -195,8 +195,9 @@ def to_filename(self, filename, compression=None, compression_opts=None): compression_opts=compression_opts, ) - def to_nifti(self, filename, insert_b0=False): + def to_nifti(self, filename, **kwargs): """Write a NIfTI 1.0 file to disk.""" + insert_b0 = kwargs.get("insert_b0", False) data = ( self.dataobj if not insert_b0 diff --git a/src/eddymotion/data/pet.py b/src/eddymotion/data/pet.py index 4591962d..9df98e27 100644 --- a/src/eddymotion/data/pet.py +++ b/src/eddymotion/data/pet.py @@ -121,7 +121,7 @@ def to_filename(self, filename, compression=None, compression_opts=None): compression_opts=compression_opts, ) - def to_nifti(self, filename, insert_b0=False): + def to_nifti(self, filename, *_): """Write a NIfTI 1.0 file to disk.""" nii = nb.Nifti1Image(self.dataobj, self.affine, None) nii.header.set_xyzt_units("mm")