Skip to content

docstring code formatter: add a --docstring-code-format parameter to ruff format CLI #9186

@kdeldycke

Description

@kdeldycke

Following the implementation of experimental docstring format, a docstring-code-format configuration "knob" has been added in #8854. That way you can activate this new behavior by adding the following to ruff.toml (or any equivalent):

[format]
docstring-code-format = true

What I would like to have is a --docstring-code-format CLI option that I can use like so:

$ ruff format --docstring-code-format .

Why? Because I would like to test the docstring formatter on some projects, by the way of reuseable GitHub actions. And for these projects, I do not have the authority on the configuration files. I can only alter CLI parameters of ruff in the actions.

Is my proposal reasonable? Or is there a way I can pass arbitrary local configuration parameters via the CLI?

Metadata

Metadata

Assignees

No one assigned

    Labels

    formatterRelated to the formatterwishNot on the current roadmap; maybe in the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions