mik-laj commented on a change in pull request #6074: [AIRFLOW-5390] Remove 
provide context
URL: https://github.com/apache/airflow/pull/6074#discussion_r322964532
 
 

 ##########
 File path: docs/howto/operator/python.rst
 ##########
 @@ -34,7 +34,8 @@ Passing in arguments
 ^^^^^^^^^^^^^^^^^^^^
 
 Use the ``op_args`` and ``op_kwargs`` arguments to pass additional arguments
-to the Python callable.
+to the Python callable. If you use any of the :doc:`context variables 
<../../macros-ref>`
+as an argument of the provided callable, the value will be automatically 
injected as shown below:
 
 Review comment:
   > All context variables can still be provided with a double-asterisk 
argument:
   > 
   > ```python
   > def myfunc(**context):
   >     print(context)  # all variables will be provided to context
   > 
   > ```
   > 
   > 
   > python_operator = PythonOperator(task_id='mytask', python_callable=myfunc)
   
   I think this part of UPDATING.md is missing in docs. 
   
   In my opinion, there is still too much documentation in the UPDATING.md file.
   
   Maybe it's worth moving some content from this file and linking to other 
documentation? I mentioned this file, but docstring is also useful 
documentation. This can discuss reserved parameter names ..

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to