Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Unexpected comment movement when formatting ruff config #21

@adamtheturtle

Description

@adamtheturtle

I had the following ruff configuration:

[tool.ruff.lint]
select = ["ALL"]

ignore = [
    # We do not annotate the type of 'self'.
    "ANN101",
]

# Do not automatically remove commented out code.
# We comment out code during development, and with VSCode auto-save, this code
# is sometimes annoyingly removed.
unfixable = ["ERA001"]

I ran pyproject-fmt 2.1.1.

I got the following (moved into the tool.ruff section):

[tool.ruff]
lint.select = [
    "ALL",
]

lint.unfixable = [
    "ERA001",
]
lint.ignore = [
    # We do not annotate the type of 'self'.
    "ANN101",
]
# Do not automatically remove commented out code.
# We comment out code during development, and with VSCode auto-save, this code
# is sometimes annoyingly removed.

See the comment at the end of the section - that was associated with the unfixable setting, but after the formatting, that association is lost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions