law.task.proxy#

Proxy task definition and helpers.

Class ProxyTask#

class ProxyTask(*args, **kwargs)[source]#

Bases: BaseTask

Class ProxyCommand#

class ProxyCommand(task, exclude_task_args=None, exclude_global_args=None, executable='law')[source]#

Bases: object

Functions#

get_proxy_attribute(task, attr, proxy=True, super_cls=<class 'law.task.base.Task'>)[source]#

Returns an attribute attr of a task taking into account possible proxies such as owned by workflow (BaseWorkflow) or sandbox tasks (SandboxTask). The reason for having an external function to evaluate possible attribute forwarding is the complexity of attribute lookup independent of the method resolution order. When the requested attribute is not forwarded or proxy is False, the default lookup implemented in super_cls is used.