Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: add new docstring-code-format knob #8854

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Commits on Dec 13, 2023

  1. ruff_python_formatter: make docstring-code-line-length default to 'dy…

    …namic'
    
    I do feel like this is probably the right default and perhaps will be
    the least surprising. It also has the benefit of avoiding the line
    length lint in all cases.
    BurntSushi committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    710a000 View commit details
    Browse the repository at this point in the history
  2. config: add new 'docstring-code-format' and 'docstring-code-line-leng…

    …th' knobs
    
    This commit does the plumbing to make a new formatting option,
    'docstring-code-format', available in the configuration for end users.
    It is disabled by default (opt-in). It is opt-in at least initially to
    reflect a conservative posture. The intent is to make it opt-out at
    some point in the future.
    
    This also adds a compansion option, 'docstring-code-line-length', that
    permits setting a line length for reformatted code examples that is
    distinct from the global setting. Its default value is 'dynamic', which
    means reformatted code will respect the global line width, regardless of
    the indent level of the enclosing docstring.
    BurntSushi committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    bac1d2f View commit details
    Browse the repository at this point in the history