diff --git a/Makefile b/Makefile index fa3ae0783..32cb35be1 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/ruff-extended.toml b/ruff-extended.toml new file mode 100644 index 000000000..6cee5972f --- /dev/null +++ b/ruff-extended.toml @@ -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"] diff --git a/ruff.toml b/ruff.toml index b25602e4d..62e6457b0 100644 --- a/ruff.toml +++ b/ruff.toml @@ -5,4 +5,4 @@ target-version = "py310" [lint] select = ["E", "F", "W", "I", "ASYNC", "UP", "FLY", "PERF", "FURB"] -ignore = [] +ignore = ["E501"]