|
34 | 34 | from hera.memoize import Memoize
|
35 | 35 | from hera.metric import Metric, Metrics
|
36 | 36 | from hera.operator import Operator
|
37 |
| -from hera.parameter import Parameter |
| 37 | +from hera.parameter import Parameter, MISSING |
38 | 38 | from hera.port import ContainerPort
|
39 | 39 | from hera.resource_template import ResourceTemplate
|
40 | 40 | from hera.resources import Resources
|
@@ -696,12 +696,12 @@ def _deduce_input_params_from_source(self) -> List[Parameter]:
|
696 | 696 |
|
697 | 697 | # If there are any kwargs arguments associated with the function signature,
|
698 | 698 | # we store these as we can set them as default values for argo arguments
|
699 |
| - source_signature: Dict[str, Optional[str]] = {} |
| 699 | + source_signature: Dict[str, Optional[Any]] = {} |
700 | 700 | for p in inspect.signature(self.source).parameters.values():
|
701 | 701 | if p.default != inspect.Parameter.empty and p.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD:
|
702 | 702 | source_signature[p.name] = p.default
|
703 | 703 | else:
|
704 |
| - source_signature[p.name] = None |
| 704 | + source_signature[p.name] = MISSING |
705 | 705 |
|
706 | 706 | # Deduce input parameters from function source. Only add those which haven't been explicitly set in inputs
|
707 | 707 | input_params_names = [p.name for p in self.inputs if isinstance(p, Parameter)]
|
@@ -772,7 +772,7 @@ def _deduce_input_params_from_source(self) -> List[Parameter]:
|
772 | 772 | # Verify that we're utilizing 'item'
|
773 | 773 | if not any([p.contains_item for p in self.inputs + deduced_params]): # type: ignore
|
774 | 774 | raise ValueError(
|
775 |
| - "`with_param` or `with_sequence` items are utilized in inputs, nor could they be deduced" |
| 775 | + "`with_param` or `with_sequence` items are not utilized in inputs, nor could they be deduced" |
776 | 776 | )
|
777 | 777 |
|
778 | 778 | return deduced_params
|
|
0 commit comments