2e428699c7681cdd576f16af343314dec966144b,src/python/pants/engine/exp/scheduler.py,,_execute_binding,#Any#,81
Before Change
def _execute_binding(func_or_task_type, **kwargs):
// A picklable top-level function to help support local multiprocessing uses.
if inspect.isclass(func_or_task_type):
if not issubclass(func_or_task_type, Task):
raise ValueError() // TODO(John Sirois): XXX fixme
function = func_or_task_type().execute
else:
function = func_or_task_type
return function(**kwargs)
class Plan(Serializable):
After Change
// TODO(John Sirois): Plumb (context, workdir) or equivalents to the task_type constructor if
// maintaining Task as a bridge to convert old style tasks makes sense. Otherwise, simplify
// things and only accept a func.
function = categorization.func if categorization.func else categorization.task_type().execute
return function(**kwargs)
class Plan(Serializable):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: pantsbuild/pants
Commit Name: 2e428699c7681cdd576f16af343314dec966144b
Time: 2015-10-23
Author: john.sirois@gmail.com
File Name: src/python/pants/engine/exp/scheduler.py
Class Name:
Method Name: _execute_binding
Project Name: elfi-dev/elfi
Commit Name: 9e010808de2555cd673ceb9d472751c70adaf7c6
Time: 2016-12-07
Author: jarno.lintusaari@aalto.fi
File Name: elfi/distributions.py
Class Name: RandomVariable
Method Name: _prepare_operation
Project Name: descarteslabs/descarteslabs-python
Commit Name: 947dd34c5a56851f7cde781802e239e9e61c790b
Time: 2020-04-07
Author: 13060286+stephaniegott@users.noreply.github.com
File Name: descarteslabs/workflows/types/numpy/numpy_overrides.py
Class Name:
Method Name: _ufunc_result_type