From 3edce64210228797337023580163c6b9d3a467ee Mon Sep 17 00:00:00 2001 From: "Eric N. Vander Weele" Date: Thu, 25 Apr 2024 16:21:38 +0100 Subject: [PATCH] 2021: Address deprecation warnings for latest ruff version Ensure the continuity of invoking `ruff`. --- 2021/Makefile | 2 +- 2021/ruff.toml | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/2021/Makefile b/2021/Makefile index da34a7c..57c8862 100644 --- a/2021/Makefile +++ b/2021/Makefile @@ -37,7 +37,7 @@ lint-types: .PHONY: format format: - $(ruff) --fix-only $(srcs) + $(ruff) check --fix-only $(srcs) $(black) $(srcs) .PHONY: distclean diff --git a/2021/ruff.toml b/2021/ruff.toml index cd24234..eee877d 100644 --- a/2021/ruff.toml +++ b/2021/ruff.toml @@ -1,3 +1,10 @@ +# Group errors by file. +output-format = "full" + +# Show sumamry of fixes. +show-fixes = true + +[lint] extend-select = [ "W", # pycodestyle warnings "I", # isort @@ -5,16 +12,7 @@ extend-select = [ "B", # flake8-bugbear ] -# Group errors by file. -output-format = "grouped" - -# Show source context of error. -show-source = true - -# Show sumamry of fixes. -show-fixes = true - -[isort] +[lint.isort] force-single-line = true force-sort-within-sections = true order-by-type = false