-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: replace Python linter flake8 with ruff
- Loading branch information
Showing
15 changed files
with
65 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
!.eslintignore | ||
!.eslintrc.js | ||
!.eslintrc.yaml | ||
!.flake8 | ||
!.gitattributes | ||
!.github | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[tool.ruff] | ||
select = [ | ||
"C90", # McCabe cyclomatic complexity | ||
"E", # pycodestyle | ||
"F", # Pyflakes | ||
"ICN", # flake8-import-conventions | ||
"INT", # flake8-gettext | ||
"PLC", # Pylint conventions | ||
"PLE", # Pylint errors | ||
"PLR09", # Pylint refactoring: max-args, max-branches, max returns, max-statements | ||
"PYI", # flake8-pyi | ||
"RSE", # flake8-raise | ||
"RUF", # Ruff-specific rules | ||
"T10", # flake8-debugger | ||
"TCH", # flake8-type-checking | ||
"TID", # flake8-tidy-imports | ||
"W", # pycodestyle | ||
"YTT", # flake8-2020 | ||
] | ||
exclude = [ | ||
"deps", | ||
"tools/inspector_protocol", | ||
] | ||
ignore = [ | ||
"E401", | ||
"E402", | ||
"E7", | ||
"PLC1901", | ||
"RUF005", | ||
] | ||
line-length = 172 | ||
target-version = "py37" | ||
|
||
[tool.ruff.mccabe] | ||
max-complexity = 100 | ||
|
||
[tool.ruff.pylint] | ||
max-args = 12 | ||
max-branches = 110 | ||
max-returns = 12 | ||
max-statements = 289 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
flake8 | ||
pytest | ||
ruff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters