Skip to content

Commit fa94344

Browse files
authored
Merge pull request #2793 from oesteban/maint/maint/collections-deprecation-warning
[MAINT] Import only Sequence to avoid DeprecationWarning
2 parents e29ac95 + fa27d73 commit fa94344

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/interfaces/base/traits_extension.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from builtins import str, bytes
2727
import os
28-
import collections
28+
from collections import Sequence
2929

3030
# perform all external trait imports here
3131
from traits import __version__ as traits_version
@@ -323,7 +323,7 @@ def validate(self, object, name, value):
323323

324324
# want to treat range and other sequences (except str) as list
325325
if not isinstance(value, (str, bytes)) and isinstance(
326-
value, collections.Sequence):
326+
value, Sequence):
327327
value = list(value)
328328

329329
if not isdefined(value) or \

0 commit comments

Comments
 (0)