[nodes] Adds arg0_to_kwargs and kwargs_to_arg0 transformations.
This commit is contained in:
@ -10,11 +10,13 @@ from bonobo.util.objects import ValueHolder
|
|||||||
from bonobo.util.term import CLEAR_EOL
|
from bonobo.util.term import CLEAR_EOL
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'identity',
|
|
||||||
'Limit',
|
'Limit',
|
||||||
'Tee',
|
|
||||||
'count',
|
|
||||||
'PrettyPrinter',
|
'PrettyPrinter',
|
||||||
|
'Tee',
|
||||||
|
'arg0_to_kwargs',
|
||||||
|
'count',
|
||||||
|
'identity',
|
||||||
|
'kwargs_to_arg0',
|
||||||
'noop',
|
'noop',
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -86,3 +88,11 @@ class PrettyPrinter(Configurable):
|
|||||||
def noop(*args, **kwargs): # pylint: disable=unused-argument
|
def noop(*args, **kwargs): # pylint: disable=unused-argument
|
||||||
from bonobo.constants import NOT_MODIFIED
|
from bonobo.constants import NOT_MODIFIED
|
||||||
return NOT_MODIFIED
|
return NOT_MODIFIED
|
||||||
|
|
||||||
|
|
||||||
|
def arg0_to_kwargs(row):
|
||||||
|
return Bag(**row)
|
||||||
|
|
||||||
|
|
||||||
|
def kwargs_to_arg0(**row):
|
||||||
|
return Bag(row)
|
||||||
|
|||||||
Reference in New Issue
Block a user