You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: airflow-core/docs/core-concepts/taskflow.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ If you write most of your dags using plain Python code rather than Operators, th
24
24
25
25
TaskFlow takes care of moving inputs and outputs between your Tasks using XComs for you, as well as automatically calculating dependencies - when you call a TaskFlow function in your DAG file, rather than executing it, you will get an object representing the XCom for the result (an ``XComArg``), that you can then use as inputs to downstream tasks or operators. For example::
26
26
27
-
from airflow.decorators import task
27
+
from airflow.sdk import task
28
28
from airflow.providers.email import EmailOperator
29
29
30
30
@task
@@ -112,7 +112,7 @@ a ``Asset``, which is ``@attr.define`` decorated, together with TaskFlow.
Copy file name to clipboardExpand all lines: airflow-core/docs/howto/create-custom-decorator.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,10 +43,10 @@ tasks. The steps to create and register ``@task.foo`` are:
43
43
.. code-block:: python
44
44
45
45
from typing importTYPE_CHECKING
46
-
from airflow.decorators.baseimport task_decorator_factory
46
+
from airflow.sdk.bases.decoratorimport task_decorator_factory
47
47
48
48
ifTYPE_CHECKING:
49
-
from airflow.decorators.baseimport TaskDecorator
49
+
from airflow.sdk.bases.decoratorimport TaskDecorator
50
50
51
51
52
52
deffoo_task(
@@ -96,11 +96,11 @@ tasks. The steps to create and register ``@task.foo`` are:
96
96
For better or worse, Python IDEs can not auto-complete dynamically
97
97
generated methods (see `JetBrain's write up on the subject <https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000665110-auto-completion-for-dynamic-module-attributes-in-python>`_).
98
98
99
-
To hack around this problem, a type stub ``airflow/decorators/__init__.pyi`` is provided to statically declare
99
+
To hack around this problem, a type stub ``airflow/sdk/definitions/decorators/__init__.pyi`` is provided to statically declare
100
100
the type signature of each task decorator. A newly added task decorator should declare its signature stub
0 commit comments