From dc96595f10239084cb9dfeaac278e6a3844e413d Mon Sep 17 00:00:00 2001 From: Julian Mundhahs Date: Fri, 18 Oct 2024 21:28:29 +0200 Subject: [PATCH 1/3] Fix ruff --- .pre-commit-config.yaml | 10 ++++++++++ ruff.toml | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 ruff.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..3994605a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: + - repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.7.0 + hooks: + # Run the linter. + - id: ruff + args: [ --fix ] + # Run the formatter. + - id: ruff-format diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 00000000..a9ac6dc5 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,2 @@ +[lint] +select = ["E4", "E7", "E9", "F", "I"] From 4c8f61ec2af0e121dabc27945bd134678ef19b50 Mon Sep 17 00:00:00 2001 From: Julian Mundhahs Date: Wed, 23 Oct 2024 21:12:59 +0200 Subject: [PATCH 2/3] Enable some more linting rules (including line length) --- ruff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruff.toml b/ruff.toml index a9ac6dc5..613bb750 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,2 +1,2 @@ [lint] -select = ["E4", "E7", "E9", "F", "I"] +select = ["E2", "E3", "E4", "E5", "E7", "E9", "F", "I"] From 3093beea69c3ae377bb6024f87f4f8e19caa688c Mon Sep 17 00:00:00 2001 From: Hannah Bast Date: Thu, 30 Jan 2025 21:39:10 +0100 Subject: [PATCH 3/3] Add precommit hook that checks formatting via `ruff --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3994605a..a834308f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.7.0 + rev: v0.9.4 hooks: # Run the linter. - id: ruff