-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ruff.toml with Python lint configuration
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
target-version = "py312" | ||
|
||
[lint] | ||
select = [ | ||
"B0", # bugbear (all B0* checks enabled by default) | ||
"B904", # bugbear (Within an except clause, raise exceptions with raise ... from err) | ||
"B905", # bugbear (zip() without an explicit strict= parameter set.) | ||
"E", # pycodestyles | ||
"W", # pycodestyles | ||
"F", # pyflakes | ||
"I", # isort | ||
"PGH", # pygrep-hooks | ||
"PLC", # pylint conventions | ||
"PLE", # pylint errors | ||
"UP", # pyupgrade | ||
] | ||
ignore = [ | ||
"E402", # module import not at top of file | ||
"UP038", # Use X | Y in isinstance check instead of (X, Y) | ||
] | ||
|
||
[lint.per-file-ignores] | ||
# Want to preserve compatibility for old Python versions in tools directory so | ||
# disable pyupgrade. Oldest supported version is currently 3.9. | ||
"tools/*" = ["UP"] |
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