Browse Source

[python] Correct python import syntax in example (#7617)

fix: #7615
Jiajie Zhong 3 years ago
parent
commit
fd6eb1f830

+ 1 - 2
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

+ 1 - 2
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",