From 083dddc0214b4cd9a8dab9675d8ba5b4eabf2dc5 Mon Sep 17 00:00:00 2001 From: Sebastian Jeltsch Date: Sun, 5 Jan 2025 22:47:29 +0100 Subject: [PATCH] Poetry v2 redefined -C thus switching to -P restoring the original behavior. --- .pre-commit-config.yaml | 6 +++--- Makefile | 4 ++-- client/trailbase-py/pyproject.toml | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c8f58aef..a5a8c9c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -130,7 +130,7 @@ repos: ### Python client - id: python_format name: Python format - entry: poetry -C client/trailbase-py run black --check . + entry: poetry -P client/trailbase-py run black --config client/trailbase-py/pyproject.toml --check . language: system types: [file] files: .*\.(py)$ @@ -138,7 +138,7 @@ repos: - id: python_check name: Python check - entry: poetry -C client/trailbase-py run pyright + entry: poetry -P client/trailbase-py run pyright --outputjson language: system types: [file] files: .*\.(py)$ @@ -146,7 +146,7 @@ repos: - id: python_test name: Python test - entry: poetry -C client/trailbase-py run pytest + entry: poetry -P client/trailbase-py run pytest language: system types: [file] files: .*\.(py)$ diff --git a/Makefile b/Makefile index 0d400ea2..bfb8a60c 100644 --- a/Makefile +++ b/Makefile @@ -9,14 +9,14 @@ format: dart format client/trailbase-dart/ examples/blog/flutter/; \ txtpbfmt `find . -regex ".*.textproto"`; \ dotnet format client/trailbase-dotnet; \ - poetry -C client/trailbase-py run black --config client/trailbase-py/pyproject.toml . + poetry -P client/trailbase-py run black --config client/trailbase-py/pyproject.toml . check: pnpm -r check; \ cargo clippy --workspace --no-deps; \ dart analyze client/trailbase-dart examples/blog/flutter; \ dotnet format client/trailbase-dotnet --verify-no-changes; \ - poetry -C client/trailbase-py run pyright + poetry -P client/trailbase-py run pyright docker: docker build . -t trailbase/trailbase diff --git a/client/trailbase-py/pyproject.toml b/client/trailbase-py/pyproject.toml index 01ce8d29..77a5ab2c 100644 --- a/client/trailbase-py/pyproject.toml +++ b/client/trailbase-py/pyproject.toml @@ -4,6 +4,7 @@ version = "0.1.0" description = "" authors = ["TrailBase "] readme = "README.md" +requires-poetry = ">=2.0" [tool.poetry.dependencies] python = "^3.12"