Fedir Zadniprovskyi 2024-07-03
update pre-commit deps, replace custom pyright hook
@eda823c9a748d2bf5fdae6579ffe1b1e08a34836
.github/workflows/docker-build-and-push.yaml
--- .github/workflows/docker-build-and-push.yaml
+++ .github/workflows/docker-build-and-push.yaml
@@ -1,5 +1,4 @@
 name: docker-build-and-push
-
 on:
   workflow_dispatch:
   push:
@@ -7,10 +6,8 @@
       - 'v*'
   release:
     types: [published]
-
 env:
   IMAGE_NAME: fedirz/faster-whisper-server
-
 jobs:
   docker:
     runs-on: ubuntu-22.04
.pre-commit-config.yaml
--- .pre-commit-config.yaml
+++ .pre-commit-config.yaml
@@ -2,18 +2,18 @@
 # See https://pre-commit.com/hooks.html for more hooks
 repos:
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v3.2.0
+    rev: v4.6.0
     hooks:
       - id: trailing-whitespace
       - id: end-of-file-fixer
       - id: check-yaml
       - id: check-added-large-files
   - repo: https://github.com/python-jsonschema/check-jsonschema
-    rev: 0.28.4
+    rev: 0.28.6
     hooks:
       - id: check-taskfile
   - repo: https://github.com/rhysd/actionlint
-    rev: v1.7.0
+    rev: v1.7.1
     hooks:
       - id: actionlint
   - repo: https://github.com/IamTheFij/docker-pre-commit
@@ -21,27 +21,23 @@
     hooks:
       - id: docker-compose-check
   - repo: https://github.com/hadolint/hadolint
-    rev: v2.12.0
+    rev: v2.13.0-beta
     hooks:
       - id: hadolint
-  - repo: https://github.com/shellcheck-py/shellcheck-py
-    rev: v0.10.0.1
-    hooks:
-      - id: shellcheck
   - repo: https://github.com/astral-sh/ruff-pre-commit
     # Ruff version.
-    rev: v0.4.10
+    rev: v0.5.0
     hooks:
       # Run the linter.
       - id: ruff
-        args: [ --fix ]
+        args: [--fix]
       # Run the formatter.
       - id: ruff-format
-  # NOTE: not using https://github.com/RobertCraigie/pyright-python because it doesn't work with poetry virtual environments
-  - repo: local
+  - repo: https://github.com/google/yamlfmt
+    rev: v0.13.0
+    hooks:
+      - id: yamlfmt
+  - repo: https://github.com/RobertCraigie/pyright-python
+    rev: v1.1.369
     hooks:
       - id: pyright
-        name: pyright
-        entry: ./pre-commit-scripts/pyright.sh
-        language: script
-        pass_filenames: false
 
pre-commit-scripts/pyright.sh (deleted)
--- pre-commit-scripts/pyright.sh
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-# shellcheck disable=SC1091
-source "$(poetry env info --path)"/bin/activate
-pyright
pyproject.toml
--- pyproject.toml
+++ pyproject.toml
@@ -27,3 +27,6 @@
 # typeCheckingMode = "strict"
 pythonVersion = "3.12"
 pythonPlatform = "Linux"
+# https://github.com/RobertCraigie/pyright-python/tree/804dafbe7ab1b9c8766c2b4755fb29db37959ab7?tab=readme-ov-file#pre-commit
+venvPath = "."
+venv = ".venv"
Add a comment
List