Skip to content

Commit 7616d8d

Browse files
FIX: LGTM warning: Unnecessary 'else' clause in loop
This 'for' statement has a redundant 'else' as no 'break' is present in the body. https://lgtm.com/rules/5980098/
1 parent ed4fa41 commit 7616d8d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nibabel/cifti2/cifti2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,8 +1156,7 @@ def get_index_map(self, index):
11561156
a2md = self._get_indices_from_mim(v)
11571157
if index in a2md:
11581158
return v
1159-
else:
1160-
raise Cifti2HeaderError("Index not mapped")
1159+
raise Cifti2HeaderError("Index not mapped")
11611160

11621161
def _validate_new_mim(self, value):
11631162
if value.applies_to_matrix_dimension is None:

0 commit comments

Comments
 (0)