mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-09 18:18:43 +08:00
BUG: Preseve docstring in batch functions
The batch_transform decorator wipes out the doc string of the function it wraps. Decorate the creator with functools.wraps to preserve function metadata.
This commit is contained in:
committed by
Eddie Hebert
parent
1906c2d416
commit
16660cf414
@@ -17,6 +17,7 @@
|
||||
"""
|
||||
Generator versions of transforms.
|
||||
"""
|
||||
import functools
|
||||
import types
|
||||
import logbook
|
||||
import numpy
|
||||
@@ -594,6 +595,7 @@ def batch_transform(func):
|
||||
For an example on how to use this, see the doc string of BatchTransform.
|
||||
"""
|
||||
|
||||
@functools.wraps(func)
|
||||
def create_window(*args, **kwargs):
|
||||
# passes the user defined function to BatchTransform which it
|
||||
# will call instead of self.get_value()
|
||||
|
||||
Reference in New Issue
Block a user