Skip to content

Apply dedent when docstring is passed as task doc #66477

Closed

Description

@darkag

Description

When using task decorator, task documentation can be passed using via the function docstring like this

@task(task_display_name="My task")
    def my_task(**context):
        """
        This task do ...

        In case of error you should do ...
        """

Unfortuntally, since no dedent is applied the display in the user interface is unattractive. It's possible to achieve a good result by removing the indentation from the DAG file, but this makes the code less readable.

Use case/motivation

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:UIkind:featureneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions