Fix documentation errors (#11536)
In trialing an upgrade of sphinx-autoapi to 1.5.1 (it has other problem with metaclasses right now, so we cant use it just yet) I noticed these cases of warnings that would become errors if we upgraded.
This commit is contained in:
Родитель
7b7cc3c391
Коммит
c099e0a2b5
|
@ -564,10 +564,18 @@ def get_current_context() -> Dict[str, Any]:
|
|||
Obtain the execution context for the currently executing operator without
|
||||
altering user method's signature.
|
||||
This is the simplest method of retrieving the execution context dictionary.
|
||||
** Old style:
|
||||
|
||||
**Old style:**
|
||||
|
||||
.. code:: python
|
||||
|
||||
def my_task(**context):
|
||||
ti = context["ti"]
|
||||
** New style:
|
||||
|
||||
**New style:**
|
||||
|
||||
.. code:: python
|
||||
|
||||
from airflow.task.context import get_current_context
|
||||
def my_task():
|
||||
context = get_current_context()
|
||||
|
|
|
@ -48,7 +48,7 @@ def get_connection_parameter_names() -> Set[str]:
|
|||
|
||||
def _parse_env_file(file_path: str) -> Tuple[Dict[str, List[str]], List[FileSyntaxError]]:
|
||||
"""
|
||||
Parse a file in the ``.env '' format.
|
||||
Parse a file in the ``.env`` format.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче