Skip to content

Improve line-length vs. autofix interactions (force-allow? force-disallows?) #8106

@tdulcet

Description

@tdulcet

Please consider adding some method to force all autofixes regardless if they might make some lines too long. When using an autoformater (e.g. Ruff), any excessively long lines would be fixed anyway. Maybe do this automatically when E501 (line-too-long) is not selected. This would save a considerable amount of time when switching a large project to Ruff, as it would eliminate the need for unnecessary manual fixes.

This potential workaround does not work:

$ ruff --line-length 9999 --unsafe-fixes --fix .
error: invalid value '9999' for '--line-length <LINE_LENGTH>': The line width must be a value between 1 and 320.

Some fixes need more than 320 columns, so using --line-length 320 would not work either.

$ ruff --version
ruff 0.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    configurationRelated to settings and configurationneeds-decisionAwaiting a decision from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions