From cd5fb12e46026f224ed24ad52a6e8711ff212cfe Mon Sep 17 00:00:00 2001 From: chenrj <102030622+xdu-chenrj@users.noreply.github.com> Date: Sat, 15 Oct 2022 07:43:17 +0800 Subject: [PATCH] [Bug][Python] Python class description error (#12360) --- .../src/pydolphinscheduler/tasks/python.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py index de16a9931c..593cc52cc2 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py @@ -33,22 +33,22 @@ log = logging.getLogger(__file__) class Python(Task): """Task Python object, declare behavior for Python task to dolphinscheduler. - Python task support two types of parameters for :param:``code``, and here is an example: + Python task support two types of parameters for :param:``definition``, and here is an example: - Using str type of :param:``code`` + Using str type of :param:``definition`` .. code-block:: python - python_task = Python(name="str_type", code="print('Hello Python task.')") + python_task = Python(name="str_type", definition="print('Hello Python task.')") - Or using Python callable type of :param:``code`` + Or using Python callable type of :param:``definition`` .. code-block:: python def foo(): print("Hello Python task.") - python_task = Python(name="str_type", code=foo) + python_task = Python(name="str_type", definition=foo) :param name: The name for Python task. It define the task name. :param definition: String format of Python script you want to execute or Python callable you