Bug 1811850 - [lint] Replace isort linter with ruff, r=taskgraph-reviewers,linter-reviewers,marco,jcristau
This results in some changes from our current `isort` configuration. I'm unclear if it's because ruff isn't at 100% parity with isort, they choose different defaults or if I missed some configuration. Either way, the changes all look reasonable to me (see child commit), so I'm inclined to just accept the new import format it imposes. Differential Revision: https://phabricator.services.mozilla.com/D172348
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
profile=black
|
||||
known_first_party=lldbutils
|
||||
4
python/lldbutils/.ruff.toml
Normal file
4
python/lldbutils/.ruff.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["lldbutils"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
profile=black
|
||||
known_first_party=mach
|
||||
4
python/mach/.ruff.toml
Normal file
4
python/mach/.ruff.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mach"]
|
||||
@@ -7,6 +7,7 @@ from textwrap import TextWrapper
|
||||
from mach.config import TYPE_CLASSES
|
||||
from mach.decorators import Command, CommandArgument
|
||||
|
||||
|
||||
# Interact with settings for mach.
|
||||
|
||||
# Currently, we only provide functionality to view what settings are
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozboot
|
||||
4
python/mozboot/.ruff.toml
Normal file
4
python/mozboot/.ruff.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozboot"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozbuild
|
||||
8
python/mozbuild/.ruff.toml
Normal file
8
python/mozbuild/.ruff.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
extend = "../../pyproject.toml"
|
||||
src = [
|
||||
# Treat direct imports in the test modules as first party.
|
||||
"mozpack/test",
|
||||
"mozbuild/test",
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozbuild"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozlint
|
||||
4
python/mozlint/.ruff.toml
Normal file
4
python/mozlint/.ruff.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozlint"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozperftest
|
||||
4
python/mozperftest/.ruff.toml
Normal file
4
python/mozperftest/.ruff.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozperftest"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozrelease
|
||||
4
python/mozrelease/.ruff.toml
Normal file
4
python/mozrelease/.ruff.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozrelease"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozterm
|
||||
4
python/mozterm/.ruff.toml
Normal file
4
python/mozterm/.ruff.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozterm"]
|
||||
@@ -1,3 +0,0 @@
|
||||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozversioncontrol
|
||||
4
python/mozversioncontrol/.ruff.toml
Normal file
4
python/mozversioncontrol/.ruff.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozversioncontrol"]
|
||||
Reference in New Issue
Block a user