File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2059,15 +2059,18 @@ class MultiPath(traits.List):
20592059 """
20602060
20612061 def validate (self , object , name , value ):
2062+
2063+ # want to treat range and other sequences (except str) as list
2064+ if not isinstance (value , str ) and isinstance (value , collections .Sequence ):
2065+ value = list (value )
2066+
20622067 if not isdefined (value ) or \
20632068 (isinstance (value , list ) and len (value ) == 0 ):
20642069 return Undefined
2065- newvalue = value
20662070
2067- if isinstance (value , collections .Sequence ):
2068- newvalue = list (value )
2071+ newvalue = value
20692072
2070- if not isinstance (value , collections . Sequence ) \
2073+ if not isinstance (value , list ) \
20712074 or (self .inner_traits () and
20722075 isinstance (self .inner_traits ()[0 ].trait_type ,
20732076 traits .List ) and not
You can’t perform that action at this time.
0 commit comments