-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(precommit): Replace flake8 with Ruff
These opinionated bugbear rules are not implemented in Ruff yet: - B950 (line too long), using equivalent: E501. - B902 (invalid first arg for method), using equivalent: N804, N805 See: astral-sh/ruff#2954 These pycodestyle rules are not implemented in Ruff yet and have no equivalent rules: - E303 (too many blank lines), - E302 (Expected 2 blank lines, found 0) - E301 (Expected 1 blank line, found 0) Previously ignored for "pydavinci/wrappers/settings/components.py". Since they don't exist, we don't need to ignore them, but this will apply package wide. Black should handle formatting these correctly anyway.
- Loading branch information
Showing
4 changed files
with
52 additions
and
20 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
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,34 @@ | ||
|
||
# Enable flake8-bugbear (`B`) rules. | ||
select = [ | ||
"B", | ||
"C", | ||
"F", | ||
"W", | ||
"TCH", | ||
"B9", | ||
] | ||
|
||
# Never enforce `E501` (line length violations). | ||
ignore = [ | ||
"E501", | ||
"F403", | ||
"E501", | ||
"F403", | ||
"E501", | ||
"N805", | ||
"N804", | ||
"W293", | ||
] | ||
|
||
src = ["src"] | ||
|
||
# Avoid trying to fix flake8-bugbear (`B`) violations. | ||
unfixable = ["B"] | ||
|
||
[mccabe] | ||
max-complexity = 18 | ||
|
||
# Ignore `E402` (import violations) in all `__init__.py` files. | ||
[per-file-ignores] | ||
"__init__.py" = ["E402"] |