zhongjiajie commented on code in PR #53:
URL:
https://github.com/apache/dolphinscheduler-sdk-python/pull/53#discussion_r1052887580
##########
src/pydolphinscheduler/core/task.py:
##########
@@ -415,3 +453,31 @@ def environment_code(self) -> str:
if self._environment_name is None:
return None
return gateway.query_environment_info(self._environment_name)
+
+ @property
+ def local_params(self):
+ """Convert local params."""
+ local_params = copy.deepcopy(self._local_params)
+ local_params.extend(
+ ParameterHelper.convert_params(self._input_params, Direction.IN)
+ )
+ local_params.extend(
+ ParameterHelper.convert_params(self._output_params, Direction.OUT)
+ )
+ return local_params
+
+ def add_in(self, name, value=None):
+ """Add input parameters.
+
+ :param name: str, name of the input parameter.
+ :param value: [int | str | float | bool | ParameterType ], value of
the input parameter.
Review Comment:
The type hint should be better in parameter declare, it will render the type
in API document when in param typing
```diff
- def add_in(self, name, value=None):
+ def add_in(self, name: str, value: Optional[Union[int, str, float, bool,
ParameterType]] = None):
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]