File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 22
33import  logging 
44import  typing  as  ty 
5+ from  functools  import  wraps 
56
67import  nipype .pipeline .engine  as  pe 
78from  nipype .pipeline .engine .base  import  EngineBase 
@@ -14,8 +15,9 @@ def tag(tag: str) -> ty.Callable:
1415    This is used to mark nodes or workflows for replacement in the splicing process. 
1516    """ 
1617
17-     def  _decorator (func , * args , ** kwargs ) ->  ty .Callable :
18-         def  _tag () ->  EngineBase :
18+     def  _decorator (func ) ->  ty .Callable :
19+         @wraps (func ) 
20+         def  _tag (* args , ** kwargs ) ->  EngineBase :
1921            node  =  func (* args , ** kwargs )
2022            node ._tag  =  tag 
2123            return  node 
Original file line number Diff line number Diff line change @@ -157,7 +157,8 @@ def test_splice(wf0):
157157
158158def  test_tag ():
159159    @tag ('foo' ) 
160-     def  init_workflow ():
160+     def  init_workflow (* ,  xarg :  str ):
161161        return  Workflow (name = 'foo' )
162162
163-     assert  init_workflow ()._tag  ==  'foo' 
163+     wf  =  init_workflow (xarg = 'bar' )
164+     assert  wf ._tag  ==  'foo' 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments