From 66a14d9e3a6d4db6784685d30d45ea62b50ccb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Thu, 2 May 2024 15:07:59 +0200 Subject: [PATCH] Upgrade linters --- .pre-commit-config.yaml | 4 ++-- docs/gen_cli_doc.py | 1 + pyproject.toml | 8 +++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3c3104e..0179350 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,14 +2,14 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-toml - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.1.3 + rev: v0.4.2 hooks: - id: ruff args: [--exit-non-zero-on-fix] diff --git a/docs/gen_cli_doc.py b/docs/gen_cli_doc.py index 43bcb86..768fc65 100644 --- a/docs/gen_cli_doc.py +++ b/docs/gen_cli_doc.py @@ -5,6 +5,7 @@ Copyright (c) 2020 Sebastián Ramírez (MIT License). """ + from pathlib import Path from typing import cast diff --git a/pyproject.toml b/pyproject.toml index 2f40582..1bc19b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,10 @@ exclude = [ [tool.ruff] +target-version = "py37" fix = true + +[tool.ruff.lint] select = [ "B", "E", @@ -73,17 +76,16 @@ select = [ "UP", "W", ] -target-version = "py37" ignore = [ ] exclude = [ "docs/conf.py", ] -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["manifestoo", "manifestoo_core"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "src/manifestoo/main.py" = ["B008"]