jlaportebot commented on PR #68500:
URL: https://github.com/apache/airflow/pull/68500#issuecomment-4698872139

   Addressed review comments:
   
   1. **Use `inspect.cleandoc` instead of `textwrap.dedent().strip()`** - 
Changed in `task-sdk/src/airflow/sdk/bases/decorator.py:530`. 
`inspect.cleandoc` is specifically designed for cleaning docstrings and handles 
the case where text starts on the same line as the opening quotes.
   
   2. **Moved main test to `test_decorator.py`** - Added 
`TestTaskDocstringDedent.test_task_docstring_dedent_applied` to 
`task-sdk/tests/task_sdk/bases/test_decorator.py` with proper imports (`dag`, 
`pendulum`).
   
   3. **Removed `test_task_docstring.py`** - As requested, the other tests in 
that file didn't add significant value and have been removed.
   
   4. **Removed local `textwrap` import** from the test function.
   
   All test cases pass:
   - Multi-line docstring with indentation
   - One-liner docstring (starts on same line as quotes)
   - Explicit doc_md not overridden
   - No docstring returns None
   - Complex nested indentation
   


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