treefmt-nix icon indicating copy to clipboard operation
treefmt-nix copied to clipboard

`ruff check` should probably add `--fix`

Open declension opened this issue 1 year ago • 1 comments

Describe the bug Since the very useful #175, we can now check and format with Ruff

To Reproduce

  1. Mess up some Python files in a way that ruff check isn't happy about, e.g. unused import
  2. run nix fmt

Expected behavior Anything that can be fixed should be fixed.

Actual behavior There are errors printed, but no action taken, e.g.

    ...
    tests/test_auth.py:6:27: F401 [*] `unittest.mock.create_autospec` imported but unused
    tests/test_auth.py:7:32: F401 [*] `starlette.requests.Request` imported but unused
    Found 15 errors.
    [*] 15 fixable with the `--fix` option.

declension avatar May 14 '24 08:05 declension

/cc @pvsr

zimbatm avatar May 14 '24 08:05 zimbatm