From c5ad34df5781a29203a9af2c3a1901c335fbfc83 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:34:08 +0100 Subject: [PATCH 1/3] Specify Python module use in pre-commit hooks --- .pre-commit-config.yaml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 21aefd9c..dcb18efd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: hooks: - id: actionlint name: actionlint - entry: actionlint + entry: python -m actionlint language: system pass_filenames: false types_or: [yaml] @@ -61,7 +61,7 @@ repos: - id: mypy name: mypy stages: [push] - entry: mypy . + entry: python -m mypy . language: system types_or: [python, toml] pass_filenames: false @@ -69,90 +69,90 @@ repos: - id: check-manifest name: check-manifest stages: [push] - entry: check-manifest . + entry: python -m check-manifest . language: system pass_filenames: false - id: pyright name: pyright stages: [push] - entry: pyright . + entry: python -m pyright . language: system types_or: [python, toml] pass_filenames: false - id: vulture name: vulture - entry: vulture --min-confidence 100 --exclude .eggs + entry: python -m vulture --min-confidence 100 --exclude .eggs language: system types_or: [python] - id: pyroma name: pyroma - entry: pyroma --min 10 . + entry: python -m pyroma --min 10 . language: system pass_filenames: false types_or: [toml] - id: deptry name: deptry - entry: deptry src/ + entry: python -m deptry src/ language: system pass_filenames: false - id: pylint name: pylint - entry: pylint *.py src/ tests/ docs/ + entry: python -m pylint *.py src/ tests/ docs/ language: system stages: [manual] pass_filenames: false - id: ruff-check name: Ruff check - entry: ruff check + entry: python -m ruff check language: system types_or: [python] - id: ruff-format-diff name: Ruff format diff - entry: ruff format --diff + entry: python -m ruff format --diff language: system types_or: [python] - id: ruff-check-fix name: Ruff check fix - entry: ruff check --fix + entry: python -m ruff check --fix language: system types_or: [python] - id: ruff-format-fix name: Ruff format - entry: ruff format + entry: python -m ruff format language: system types_or: [python] - id: doc8 name: doc8 - entry: doc8 + entry: python -m doc8 language: system types_or: [rst] - id: interrogate name: interrogate - entry: interrogate + entry: python -m interrogate language: system types_or: [python] - id: pyproject-fmt-check name: pyproject-fmt check - entry: pyproject-fmt --check + entry: python -m pyproject-fmt --check language: system types_or: [toml] files: pyproject.toml - id: pyproject-fmt-fix name: pyproject-fmt - entry: pyproject-fmt + entry: python -m pyproject-fmt language: system types_or: [toml] files: pyproject.toml @@ -183,7 +183,7 @@ repos: - id: pyright-verifytypes name: pyright-verifytypes stages: [push] - entry: pyright --verifytypes vws + entry: python -m pyright --verifytypes vws language: system pass_filenames: false types_or: [python] From f480c467967a0135610e5a231795b2e1d1f4de7d Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:36:32 +0100 Subject: [PATCH 2/3] Specify Python module use in pre-commit hooks --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dcb18efd..eeddd9cf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: hooks: - id: actionlint name: actionlint - entry: python -m actionlint + entry: actionlint language: system pass_filenames: false types_or: [yaml] @@ -145,14 +145,14 @@ repos: - id: pyproject-fmt-check name: pyproject-fmt check - entry: python -m pyproject-fmt --check + entry: pyproject-fmt --check language: system types_or: [toml] files: pyproject.toml - id: pyproject-fmt-fix name: pyproject-fmt - entry: python -m pyproject-fmt + entry: pyproject-fmt language: system types_or: [toml] files: pyproject.toml From dd4345095a1d4e3d1776cf8fffaeac7154da41fe Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 9 Sep 2024 00:40:23 +0100 Subject: [PATCH 3/3] Specify Python module use in pre-commit hooks --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eeddd9cf..55d22db3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,7 @@ repos: - id: check-manifest name: check-manifest stages: [push] - entry: python -m check-manifest . + entry: python -m check_manifest . language: system pass_filenames: false