From fe4a503d62e5fdf6d95c84747a758059cda24072 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 2 May 2023 12:06:10 +0100 Subject: [PATCH] Use ruff for more checks --- .pre-commit-config.yaml | 29 ++++++++++------------------- pyproject.toml | 6 ++++++ 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b307f0d0..7b913052 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,39 +5,30 @@ repos: - id: check-docstring-first - id: end-of-file-fixer - id: trailing-whitespace + - repo: https://github.com/asottile/setup-cfg-fmt rev: v2.2.0 hooks: - id: setup-cfg-fmt - - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 - hooks: - - id: flake8 - additional_dependencies: [flake8-typing-imports>=1.9.0] - - repo: https://github.com/PyCQA/autoflake - rev: v2.1.1 - hooks: - - id: autoflake - args: ["--in-place", "--remove-all-unused-imports"] - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort + - repo: https://github.com/psf/black rev: 23.3.0 hooks: - id: black - - repo: https://github.com/asottile/pyupgrade - rev: v3.3.2 - hooks: - - id: pyupgrade - args: [--py38-plus, --keep-runtime-typing] + - repo: https://github.com/tlambert03/napari-plugin-checks rev: v0.3.0 hooks: - id: napari-plugin-checks + - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.2.0 hooks: - id: mypy args: ["--disallow-incomplete-defs", "--ignore-missing-imports"] + + - repo: https://github.com/charliermarsh/ruff-pre-commit + # Ruff version. + rev: 'v0.0.264' + hooks: + - id: ruff diff --git a/pyproject.toml b/pyproject.toml index b1a57c9b..73644cc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,3 +12,9 @@ line-length = 79 [tool.isort] profile = "black" line_length = 79 + +[tool.ruff] + +target-version = "py38" +select = ["I", "UP", "F", "E", "W"] +fix = true pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy