Closed Bug 1881295 Opened 7 months ago Closed 7 months ago

`mach format` fails with "Invalid linters given, a failure occurred in the isort linter"

Categories

(Developer Infrastructure :: Lint and Formatting, defect)

defect

Tracking

(firefox125 fixed)

RESOLVED FIXED
Tracking Status
firefox125 --- fixed

People

(Reporter: sheehan, Assigned: sheehan)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

I started switching Lando's autoformatting to mach format for bug 1807712, and when I was testing mach format in my mozilla-unified checkout to make sure I was using the correct arguments, I get the following output:

❯ ./mach format --fix --outgoing --verbose
11:43:00.316 mozlint (105639) | Looking for black at /home/sheehan/.mozbuild/srcdirs/mozilla-unified-e4b331bb1188/_virtualenvs/lint/bin/black
11:43:00.495 mozlint (105639) | Black is present with expected version 23.3.0
11:43:00.495 mozlint (105639) | setup for black finished in 0.18 seconds
11:43:00.501 mozlint (105639) | setup for clang-format finished in 0.0 seconds
Invalid linters given, run again using valid linters or no linters
A failure occurred in the isort linter.
✖ 1 problem (0 errors, 0 warnings, 1 failure, 0 fixed)

Oh, I see the problem. We replaced isort with ruff, so we need to update the entry in the formatters list.

Assignee: nobody → sheehan

Using isort for import sorting in Python has been replaced by
ruff. Update the formatters list to reflect this change.

Attachment #9388414 - Attachment description: Bug 1881295: remove `isort` and add `ruff` to formatters list r?#linter-reviewers → Bug 1881295: remove `isort` from formatters list r?#linter-reviewers
Pushed by cosheehan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cfaa1b0bcd64 remove `isort` from formatters list r=linter-reviewers,marco,ahal
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: