From 46c945f2baf05fcbaec9837c5ac025b22823c376 Mon Sep 17 00:00:00 2001 From: Fridolin Glatter Date: Wed, 16 Oct 2024 18:32:43 +0200 Subject: [PATCH] Specify python3 -m pip --- .pre-commit-config.yaml | 18 ++++++++++++++++++ .pre-commit-run-mypy.sh | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a13f6d0..d1ae0e99 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,24 @@ repos: language: system types: [python] require_serial: true +# - repo: https://github.com/python-poetry/poetry +# rev: 1.8.4 +# hooks: +# - id: poetry-export +# args: ["--with", "dev", "-o", ".requirements-mypy.txt"] +# # - id: poetry-install +# # - id: mypy +# # name: mypy +# # entry: mypy . +# # language: python +# # types: [python] +# # require_serial: true +# - repo: https://github.com/pre-commit/mirrors-mypy +# rev: v1.12.0 +# hooks: +# - id: mypy +# additional_dependencies: +# - .requirements-mypy.txt - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.6.9 hooks: diff --git a/.pre-commit-run-mypy.sh b/.pre-commit-run-mypy.sh index 73f07743..93f78a82 100644 --- a/.pre-commit-run-mypy.sh +++ b/.pre-commit-run-mypy.sh @@ -8,8 +8,8 @@ set -o errexit # Change directory to the project root directory. cd "$(dirname "$0")" -which pip -which python3 +pip --version +python3 --version # Install the dependencies into the mypy env. # Note that this can take seconds to run.