-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lint ruff, setting "select" and "ignore"
- Loading branch information
1 parent
ff4d122
commit 0a93f37
Showing
1 changed file
with
10 additions
and
3 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 |
---|---|---|
@@ -1,21 +1,28 @@ | ||
[tool.ruff.lint] | ||
# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults. | ||
select = ["E4", "E7", "E9", "F", "B", "Q"] | ||
select = ["B", "C", "E", "F", "Q", "W"] | ||
|
||
# 2. Avoid enforcing line-length violations (`E501`) | ||
ignore = ["E501"] | ||
ignore = [ | ||
"B006","B007", "B017", "B023", "B024", "B027", "B028", "B904", | ||
"C403", "C408", "C416", "C419", "C901", | ||
"E203", "E266", "E501", "E711", "E721", "E722", "E731", "E741", | ||
"F401", "F403", "F405", "F541", "F811", "F841", | ||
"W291", "W293", | ||
] | ||
|
||
# 3. Avoid trying to fix flake8-bugbear (`B`) violations. | ||
unfixable = ["B"] | ||
|
||
# 4. Ignore `E402` (import violations) in all `__init__.py` files, and in selected subdirectories. | ||
[tool.ruff.lint.per-file-ignores] | ||
"__init__.py" = ["E402"] | ||
"**/{tests,docs,tools}/*" = ["E402"] | ||
"**/{tests}/*" = ["E402"] | ||
|
||
[tool.ruff.format] | ||
# 5. Use single quotes in `ruff format`. | ||
quote-style = "single" | ||
|
||
[tool.ruff.lint.flake8-quotes] | ||
docstring-quotes = "double" | ||
|