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 1
1
import pydra
2
2
import nipype
3
- import attr
3
+ import attrs
4
4
import typing as ty
5
5
6
6
@@ -9,7 +9,7 @@ def traitedspec_to_specinfo(traitedspec):
9
9
return pydra .specs .SpecInfo (
10
10
name = "Inputs" ,
11
11
fields = [
12
- (name , attr . ib ( type = ty . Any , metadata = {"help_string" : trait .desc }))
12
+ (name , attrs . field ( metadata = {"help_string" : trait .desc }))
13
13
for name , trait in traitedspec .traits ().items ()
14
14
if name in trait_names
15
15
],
@@ -67,9 +67,7 @@ def __init__(
67
67
self .output_spec = traitedspec_to_specinfo (interface ._outputs ())
68
68
69
69
def _run_task (self ):
70
- inputs = attr .asdict (
71
- self .inputs , filter = lambda a , v : v is not attr .NOTHING , retain_collection_types = True
72
- )
70
+ inputs = attrs .asdict (self .inputs , filter = lambda a , v : v is not attrs .NOTHING )
73
71
node = nipype .Node (self ._interface , base_dir = self .output_dir , name = self .name )
74
72
node .inputs .trait_set (** inputs )
75
73
res = node .run ()
You can’t perform that action at this time.
0 commit comments