PythonCallTransformerResolver¶
-
class
ditto.resolvers.
PythonCallTransformerResolver
(callable_transformers, nested_search=True)[source]¶ Bases:
ditto.api.TransformerResolver
Similar to the
PythonCallTaskMatcher
, but finds a transformer for a operator using the same matching pattern.- Parameters
callable_transformers¶ (
Dict
[Callable
,Type
[OperatorTransformer
]]) – a map of python callables and matching transformersnested_search¶ (
bool
) – whether to search the method source code itself for the callable
-
resolve_transformer
(task)[source]¶ see the behavior of
does_match()
- Parameters
task¶ (
BaseOperator
) – the task to resolve the transformer for- Return type
Type
[OperatorTransformer
]- Returns
the resolved transformer