Skip to content

--diff unexpectedly performs the ssort on the file #128

@AndydeCleyre

Description

@AndydeCleyre

Hello, and thanks!

Testing with 0.15.0, --diff, in addition to showing the diff as expected, performs the changes on the file.

This is unexpected because:

  • the flag description is (emphasis added):

    Prints a diff of all changes ssort would make to a file.

  • similar commands, including ruff format --diff, ruff check --fix --diff, yapf --diff, autopep8 --diff, and black --diff, do not change the file when --diff is passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions