From fd6eb1f830dd60c5363971e735135afc06925380 Mon Sep 17 00:00:00 2001 From: Jiajie Zhong Date: Fri, 24 Dec 2021 20:07:49 +0800 Subject: [PATCH] [python] Correct python import syntax in example (#7617) fix: #7615 --- .../pydolphinscheduler/examples/task_dependent_example.py | 3 +-- .../pydolphinscheduler/examples/task_switch_example.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py b/dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py index 255d599781..68f2a57548 100644 --- a/dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py +++ b/dolphinscheduler-python/pydolphinscheduler/examples/task_dependent_example.py @@ -34,8 +34,7 @@ task_dependent: task_dependent(this task dependent on task_dependent_external.task_1 and task_dependent_external.task_2). """ -from constants import ProcessDefinitionDefault - +from pydolphinscheduler.constants import ProcessDefinitionDefault from pydolphinscheduler.core.process_definition import ProcessDefinition from pydolphinscheduler.tasks.dependent import And, Dependent, DependentItem, Or from pydolphinscheduler.tasks.shell import Shell diff --git a/dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py b/dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py index 418d5692e6..5ab2aa50ad 100644 --- a/dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py +++ b/dolphinscheduler-python/pydolphinscheduler/examples/task_switch_example.py @@ -29,10 +29,9 @@ parent -> switch -> . """ -from tasks.switch import Branch, Default, Switch, SwitchCondition - from pydolphinscheduler.core.process_definition import ProcessDefinition from pydolphinscheduler.tasks.shell import Shell +from pydolphinscheduler.tasks.switch import Branch, Default, Switch, SwitchCondition with ProcessDefinition( name="task_dependent_external",