Skip to content

Ruff formatter missing character limit argument #8352

Description

@ryan-cpi

We are using the ruff pre-commits formatter however there doesn't seem to be a way to pass in an argument to set the line character limit without having a config file dedicated for this. Is it possible to add an argument for this -l 120?

repos:
-   repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.1.2
    hooks:
      - id: ruff-format

Activity

  1. zanieb commented on Oct 30, 2023

    @zanieb
    Member

    Some related discussion at #7310 (comment), astral-sh/ruff-vscode#6 (comment), and #8131

    We are considering restoring this option. Note that we do not use character limits, we use line width which accounts for the width of each unicode character.

  2. added
    configurationRelated to settings and configuration of Ruff or ty
    formatterRelated to the Ruff formatter
    on Oct 30, 2023
  3. added a commit that references this issue on Nov 2, 2023
    3a889f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    configurationRelated to settings and configuration of Ruff or tyformatterRelated to the Ruff formatter

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions