b17e18b4224450aeb24e61d5545016dfe3f1b81a,descarteslabs/workflows/execution/arguments.py,,arguments_to_grafts,#,6
Before Change
try:
graftable = proxify(param).graft
except NotImplementedError:
raise TypeError(
"Invalid type for parameter {!r}: {}. "
"Must be a JSON-serializable value, Proxytype, "
"or object that `proxify` can handle. "
"Got: {}".format(name, type(param), param)
)
// Turn value grafts of literals back into their literals, for concision and URL stability.
// (Basically passing in `Int._promote(1)` is the same as passing in `1`.)
return_expr = graftable[graftable["returns"]]
After Change
for name, arg in arguments.items():
// Check arguments don"t themselves depend on params
if arg.params:
param_names = tuple(p._name for p in arg.params)
raise ValueError(
f"Arguments to a computation cannot depend on parameters, but the argument for {name!r} depends on "
f"the parameters {param_names}.\n"
f"Consider turning the object you"re passing in for {name!r} into a Function, "
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: descarteslabs/descarteslabs-python
Commit Name: b17e18b4224450aeb24e61d5545016dfe3f1b81a
Time: 2021-01-05
Author: gabe@descarteslabs.com
File Name: descarteslabs/workflows/execution/arguments.py
Class Name:
Method Name: arguments_to_grafts
Project Name: biocore/scikit-bio
Commit Name: 67d8d5f9309b13b6dc4d1a864bd4f768cffc27a4
Time: 2014-09-12
Author: jai.rideout@gmail.com
File Name: skbio/sequence/_sequence.py
Class Name: BiologicalSequence
Method Name: __getitem__
Project Name: Qiskit/qiskit-aqua
Commit Name: 6870c69273935836184b0981a9be09ed784f9367
Time: 2020-10-22
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/primitive_ops/matrix_op.py
Class Name: MatrixOp
Method Name: __init__