Skip to content

Commit d11695b

Browse files
committed
Fix PR comments
1 parent 19bbdd2 commit d11695b

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

airflow-core/docs/public-airflow-interface.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Operators
176176

177177
The base classes :class:`~airflow.sdk.BaseOperator` and :class:`~airflow.sdk.BaseSensorOperator` are public and may be extended to make new operators.
178178

179-
The recommended base class for new operators is :class:`~airflow.sdk.BaseOperator`
179+
The base class for new operators is :class:`~airflow.sdk.BaseOperator`
180180
from the airflow.sdk namespace.
181181

182182
Subclasses of BaseOperator which are published in Apache Airflow are public in *behavior* but not in *structure*. That is to say, the Operator's parameters and behavior is governed by semver but the methods are subject to change at any time.
@@ -275,10 +275,10 @@ Example of accessing Connections and Variables through Task Context:
275275
context = get_current_context()
276276
277277
conn = context["conn"]
278-
my_connection = conn.get_connection("my_connection_id")
278+
my_connection = conn.get("my_connection_id")
279279
280280
var = context["var"]
281-
my_variable = var.get("my_variable_name")
281+
my_variable = var.value.get("my_variable_name")
282282
283283
Example of using airflow.sdk namespace directly:
284284

@@ -588,9 +588,3 @@ Example of using Task Context instead of direct database access:
588588
589589
590590
example_dag()
591-
592-
.. note::
593-
594-
**For Airflow 2.x users**: If you are using Airflow 2.x, please refer to the
595-
`Airflow 2.11 Public Interface Documentation <https://airflow.apache.org/docs/apache-airflow/2.11.0/public-airflow-interface.html>`_
596-
for the legacy interface.

0 commit comments

Comments
 (0)