From 576119ae9d7af36d6a86924c5b4c2c0c4f78074a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 7 Nov 2023 09:29:33 +0200 Subject: [PATCH 1/2] Black and Ruff infer target-version from requires-python in pyproject.toml --- .pre-commit-config.yaml | 1 - pyproject.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a6b1c630041..8b2dc06ae91 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,6 @@ repos: rev: 23.10.1 hooks: - id: black - args: [--target-version=py38] - repo: https://github.com/PyCQA/bandit rev: 1.7.5 diff --git a/pyproject.toml b/pyproject.toml index 59d8da44e4c..a49179a3734 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,7 +78,6 @@ package-dir = {"" = "src"} version = {attr = "PIL.__version__"} [tool.ruff] -target-version = "py38" line-length = 88 select = [ "E", # pycodestyle errors From 548eeea488d76da049bea91ba30131623cc2e9d3 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 11 Nov 2023 16:49:04 +1100 Subject: [PATCH 2/2] Black infers target-version from requires-python in pyproject.toml --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b7f07e24d07..ad0a1adab50 100644 --- a/Makefile +++ b/Makefile @@ -118,6 +118,6 @@ lint: .PHONY: lint-fix lint-fix: python3 -c "import black" > /dev/null 2>&1 || python3 -m pip install black - python3 -m black --target-version py38 . + python3 -m black . python3 -c "import ruff" > /dev/null 2>&1 || python3 -m pip install ruff python3 -m ruff --fix .