Skip to content

Commit

Permalink
move extended rules to post-format check
Browse files Browse the repository at this point in the history
  • Loading branch information
helylle committed Sep 20, 2024
1 parent d0e89a0 commit 9c3047e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ reformat:
ruff check --select F401,I --fix
# reformat
ruff format
# make an extended check with rules that might be triggered by reformat
ruff check --config ruff-extended.toml

lint:
ruff check
Expand Down
6 changes: 6 additions & 0 deletions ruff-extended.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extend = "./ruff.toml"

[lint]
# Some rules are marked as incompatible with the formatter so use them in an extended check instead.
# See: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
extend-select = ["E501", "ISC"]
2 changes: 1 addition & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ target-version = "py310"
[lint]
select = ["E", "F", "W", "I", "ASYNC", "UP", "FLY", "PERF", "FURB"]

ignore = []
ignore = ["E501"]

0 comments on commit 9c3047e

Please sign in to comment.