diff --git a/lib/galaxy/tools/expressions/evaluation.py b/lib/galaxy/tools/expressions/evaluation.py index e6334111c84f..e5ec9636f2c3 100644 --- a/lib/galaxy/tools/expressions/evaluation.py +++ b/lib/galaxy/tools/expressions/evaluation.py @@ -1,24 +1,34 @@ import json import os import subprocess -from typing import MutableMapping +from typing import ( + Optional, + TYPE_CHECKING, +) from cwl_utils.expression import do_eval as _do_eval from .util import find_engine +if TYPE_CHECKING: + from cwl_utils.types import ( + CWLObjectType, + CWLOutputType, + ) + FILE_DIRECTORY = os.path.normpath(os.path.dirname(os.path.join(__file__))) NODE_ENGINE = os.path.join(FILE_DIRECTORY, "cwlNodeEngine.js") -def do_eval(expression: str, context: MutableMapping): +def do_eval(expression: str, jobinput: "CWLObjectType", context: Optional["CWLOutputType"] = None): return _do_eval( expression, - context, + jobinput, [{"class": "InlineJavascriptRequirement"}], None, None, {}, + context=context, cwlVersion="v1.2.1", )