Skip to content

Commit a882d6c

Browse files
oestebanmgxd
andcommitted
Apply suggestions from code review
Co-authored-by: Mathias Goncalves <[email protected]>
1 parent 2ae6131 commit a882d6c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sdcflows/fieldmaps.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def check_path(self, attribute, value):
160160
"""Validate a fieldmap path."""
161161
if isinstance(value, BIDSFile):
162162
value = Path(value.path)
163-
if isinstance(value, str):
163+
elif isinstance(value, str):
164164
value = Path(value)
165165

166166
if not value.is_file():
@@ -213,17 +213,17 @@ def __attrs_post_init__(self):
213213
f"Missing readout timing information for <{self.path}>."
214214
)
215215

216-
if self.suffix == "fieldmap" and "Units" not in self.metadata:
216+
elif self.suffix == "fieldmap" and "Units" not in self.metadata:
217217
raise MetadataError(f"Missing 'Units' for <{self.path}>.")
218218

219-
if self.suffix == "phasediff" and (
219+
elif self.suffix == "phasediff" and (
220220
"EchoTime1" not in self.metadata or "EchoTime2" not in self.metadata
221221
):
222222
raise MetadataError(
223223
f"Missing 'EchoTime1' and/or 'EchoTime2' for <{self.path}>."
224224
)
225225

226-
if self.suffix in ("phase1", "phase2") and ("EchoTime" not in self.metadata):
226+
elif self.suffix in ("phase1", "phase2") and ("EchoTime" not in self.metadata):
227227
raise MetadataError(f"Missing 'EchoTime' for <{self.path}>.")
228228

229229

0 commit comments

Comments
 (0)