From d77b0bc4ed29253d1ce130697303913226833a31 Mon Sep 17 00:00:00 2001 From: Nadav Zingerman Date: Thu, 8 Sep 2022 11:21:45 +0300 Subject: [PATCH 1/3] Various fixes to pre-commit hooks --- .pre-commit-hooks.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index d2662b8a420..6fda60d3aaa 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -3,17 +3,24 @@ description: run poetry check to validate config entry: poetry check language: python - language_version: python3 pass_filenames: false - files: ^pyproject.toml$ + files: ^pyproject\.toml$ - id: poetry-lock name: poetry-lock description: run poetry lock to update lock file entry: poetry lock language: python - language_version: python3 pass_filenames: false + files: ^pyproject\.toml|poetry\.lock$ + +- id: poetry-lock-check + name: poetry-lock-check + description: run poetry lock to check lock file is up-to-date with pyproject.toml + entry: poetry lock --check + language: python + pass_filenames: false + files: ^pyproject\.toml|poetry\.lock$ - id: poetry-export name: poetry-export @@ -22,5 +29,5 @@ language: python language_version: python3 pass_filenames: false - files: ^poetry.lock$ + files: ^poetry\.lock$ args: ["-f", "requirements.txt", "-o", "requirements.txt"] From 2ffdae5a0509433d9f70b2115ea16d8b0051d4b9 Mon Sep 17 00:00:00 2001 From: Nadav Zingerman Date: Mon, 12 Sep 2022 14:40:48 +0300 Subject: [PATCH 2/3] Update `poetry-lock-check` description Co-authored-by: Mathieu Kniewallner --- .pre-commit-hooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 6fda60d3aaa..775aa598fb6 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -16,7 +16,7 @@ - id: poetry-lock-check name: poetry-lock-check - description: run poetry lock to check lock file is up-to-date with pyproject.toml + description: check that poetry lock file is consistent with pyproject.toml entry: poetry lock --check language: python pass_filenames: false From 5a94ca6559f1b03107033a1f0d33e0c0405b0198 Mon Sep 17 00:00:00 2001 From: Nadav Zingerman <7372858+nzig@users.noreply.github.com> Date: Wed, 28 Sep 2022 22:15:28 +0300 Subject: [PATCH 3/3] Remove another `language_version` --- .pre-commit-hooks.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 775aa598fb6..38a321e54ef 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -27,7 +27,6 @@ description: run poetry export to sync lock file with requirements.txt entry: poetry export language: python - language_version: python3 pass_filenames: false files: ^poetry\.lock$ args: ["-f", "requirements.txt", "-o", "requirements.txt"]