Visitar URL original
Dedent task docstrings used as doc_md by yuseok89 · Pull Request #74436 · apache/airflow · GitHub
Skip to content

Dedent task docstrings used as doc_md - #74436

Merged
bbovenzi merged 1 commit into
apache:mainfrom
yuseok89:fix/66477-dedent-task-docstrings-v2
Oct 9, 2026
Merged

bbovenzi merged 1 commit into
apache:mainfrom
yuseok89:fix/66477-dedent-task-docstrings-v2

Conversation

@yuseok89

@yuseok89 yuseok89 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

closes: #66477
related: #68500, #71108

A @task function's docstring used as doc_md keeps the indentation of the nested function body, so it renders as an indented code block instead of Markdown. This applies inspect.cleandoc to it.

This carries over #68500, which was approved, with its review feedback applied. inspect.cleandoc also handles a docstring whose first line starts right after the opening quotes, which textwrap.dedent does not.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    • Claude Code (Opus 5.5)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@yuseok89
yuseok89 marked this pull request as ready for review October 8, 2026 05:18
@bbovenzi
bbovenzi merged commit ad2ef06 into apache:main Oct 9, 2026
210 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply dedent when docstring is passed as task doc

2 participants