Skip to content

Commit 34ef6c2

Browse files
committed
FIX: Accept "str" in dipy type (includes "string")
1 parent 443492e commit 34ef6c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nipype/interfaces/dipy/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def convert_to_traits_type(dipy_type, is_file=False):
110110
"""Convert DIPY type to Traits type."""
111111
dipy_type = dipy_type.lower()
112112
is_mandatory = bool("optional" not in dipy_type)
113-
if "variable" in dipy_type and "string" in dipy_type:
113+
if "variable" in dipy_type and "str" in dipy_type:
114114
return traits.ListStr, is_mandatory
115115
elif "variable" in dipy_type and "int" in dipy_type:
116116
return traits.ListInt, is_mandatory
@@ -120,9 +120,9 @@ def convert_to_traits_type(dipy_type, is_file=False):
120120
return traits.ListBool, is_mandatory
121121
elif "variable" in dipy_type and "complex" in dipy_type:
122122
return traits.ListComplex, is_mandatory
123-
elif "string" in dipy_type and not is_file:
123+
elif "str" in dipy_type and not is_file:
124124
return traits.Str, is_mandatory
125-
elif "string" in dipy_type and is_file:
125+
elif "str" in dipy_type and is_file:
126126
return File, is_mandatory
127127
elif "int" in dipy_type:
128128
return traits.Int, is_mandatory

0 commit comments

Comments
 (0)