File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -88,10 +88,8 @@ class CIFTI2HeaderError(Exception):
88
88
'CIFTI_STRUCTURE_THALAMUS_RIGHT' )
89
89
90
90
91
- def _value_if_klass (val , klass , check_isinstance_or_none = True ):
92
- if check_isinstance_or_none and val is None :
93
- return val
94
- elif isinstance (val , klass ):
91
+ def _value_if_klass (val , klass ):
92
+ if val is None or isinstance (val , klass ):
95
93
return val
96
94
raise ValueError ('Not a valid %s instance.' % klass .__name__ )
97
95
@@ -889,7 +887,7 @@ def metadata(self, meta):
889
887
-------
890
888
None
891
889
"""
892
- self ._meta = _value_if_klass (meta , Cifti2MetaData , True )
890
+ self ._meta = _value_if_klass (meta , Cifti2MetaData )
893
891
894
892
def __setitem__ (self , key , value ):
895
893
if not isinstance (value , Cifti2MatrixIndicesMap ):
You can’t perform that action at this time.
0 commit comments