From d4d23c60126a95a57432bf7d9d3f46f6c62a8470 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 9 Nov 2023 19:34:49 -0600 Subject: [PATCH] Update ruff config (#422) --- .pre-commit-config.yaml | 4 +++- pyproject.toml | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7764a47..afffb10e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -77,11 +77,13 @@ repos: ] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.4 + rev: v0.1.5 hooks: - id: ruff + types_or: [python, jupyter] args: ["--fix", "--show-fixes"] - id: ruff-format + types_or: [python, jupyter] - repo: https://github.com/scientific-python/cookie rev: "2023.10.27" diff --git a/pyproject.toml b/pyproject.toml index 3ad0248f..78203304 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,7 +111,10 @@ nowarn = "test -W default {args}" detached = true dependencies = ["pre-commit"] [tool.hatch.envs.lint.scripts] -build = "pre-commit run --all-files ruff" +build = [ + "pre-commit run --all-files ruff", + "pre-commit run --all-files ruff-format" +] [tool.hatch.envs.typing] dependencies = [ "pre-commit"] @@ -180,7 +183,6 @@ module = [ ignore_missing_imports = true [tool.ruff] -target-version = "py38" line-length = 100 [tool.ruff.lint]