Skip to content

Commit c9707d7

Browse files
Fix weird usage of functools.wraps
1 parent 7557036 commit c9707d7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

fairworkflows/fairstep.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,15 +438,14 @@ def _modify_function(func):
438438
inputs=inputs,
439439
outputs=outputs)
440440

441-
@functools.wraps
442441
def _add_logging(func):
442+
@functools.wraps(func)
443443
def _wrapper(*func_args, **func_kwargs):
444444
LOGGER.info(f'Running step: {func.__name__}')
445445
return func(*func_args, **func_kwargs)
446446
return _wrapper
447-
func = _add_logging(func)
448447
func._fairstep = fairstep
449-
return noodles.schedule(func)
448+
return noodles.schedule(_add_logging(func))
450449

451450
return _modify_function
452451

0 commit comments

Comments
 (0)