jlaportebot opened a new pull request, #66561:
URL: https://github.com/apache/airflow/pull/66561

   When using the @task decorator, task documentation can be passed via the 
function docstring. However, the indentation from the function body was 
preserved in the UI, making the documentation look unattractive.
   
   This change applies textwrap.dedent() to the docstring before setting it as 
doc_md, which removes the common leading whitespace from each line.
   
   Fixes #66477
   
   ## Changes
   
   - Modified  to apply  to the function docstring when setting 
   - Added comprehensive tests in  to verify:
     - Docstrings are properly dedented
     - Explicit doc_md is not overridden by function docstring
     - Complex indentation is handled correctly
     - Tasks without docstrings have no doc_md
   
   ## Testing
   
   Added 4 test cases:
   1.  - Verifies basic dedent functionality
   2.  - Verifies explicit doc_md is not overridden
   3.  - Verifies complex indentation is handled
   4.  - Verifies tasks without docstrings have no doc_md


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to