Fedir Zadniprovskyi 2024-07-19
switch to basedpyright
@905447e6bc1e002a14aed3a06dafe70947166d0b
.pre-commit-config.yaml
--- .pre-commit-config.yaml
+++ .pre-commit-config.yaml
@@ -25,19 +25,16 @@
     hooks:
       - id: hadolint
   - repo: https://github.com/astral-sh/ruff-pre-commit
-    # Ruff version.
     rev: v0.5.0
     hooks:
-      # Run the linter.
       - id: ruff
         args: [--fix]
-      # Run the formatter.
       - id: ruff-format
   - repo: https://github.com/google/yamlfmt
     rev: v0.13.0
     hooks:
       - id: yamlfmt
-  - repo: https://github.com/RobertCraigie/pyright-python
-    rev: v1.1.369
+  - repo: https://github.com/DetachHead/basedpyright-pre-commit-mirror
+    rev: v1.13.0
     hooks:
-      - id: pyright
+      - id: basedpyright
flake.nix
--- flake.nix
+++ flake.nix
@@ -24,10 +24,8 @@
               parallel
               pre-commit
               pv
-              pyright
               python312
               rsync
-              ruff
               websocat
               uv
             ];
pyproject.toml
--- pyproject.toml
+++ pyproject.toml
@@ -18,7 +18,7 @@
 ]
 
 [project.optional-dependencies]
-dev = ["ruff", "pytest", "pytest-xdist"]
+dev = ["ruff==0.5.3", "pytest", "basedpyright==1.13.0", "pytest-xdist"]
 
 other = ["youtube-dl @ git+https://github.com/ytdl-org/youtube-dl.git@37cea84f775129ad715b9bcd617251c831fcc980", "aider-chat==0.39.0"]
 
@@ -74,10 +74,10 @@
 # Like Black, automatically detect the appropriate line ending.
 line-ending = "auto"
 
-[tool.pyright]
-# typeCheckingMode = "strict"
+[tool.basedpyright]
+typeCheckingMode = "standard"
 pythonVersion = "3.12"
 pythonPlatform = "Linux"
-# https://github.com/RobertCraigie/pyright-python/tree/804dafbe7ab1b9c8766c2b4755fb29db37959ab7?tab=readme-ov-file#pre-commit
+# https://github.com/DetachHead/basedpyright?tab=readme-ov-file#pre-commit-hook
 venvPath = "."
 venv = ".venv"
requirements-all.txt
--- requirements-all.txt
+++ requirements-all.txt
@@ -38,6 +38,8 @@
     # via faster-whisper
 backoff==2.2.1
     # via aider-chat
+basedpyright==1.13.0
+    # via faster-whisper-server (pyproject.toml)
 beautifulsoup4==4.12.3
     # via aider-chat
 blinker==1.8.2
@@ -285,6 +287,8 @@
     #   yarl
 networkx==3.2.1
     # via aider-chat
+nodejs-wheel-binaries==20.15.1
+    # via basedpyright
 numpy==1.26.4
     # via
     #   faster-whisper-server (pyproject.toml)
@@ -484,7 +488,7 @@
     # via
     #   aider-chat
     #   google-auth
-ruff==0.5.2
+ruff==0.5.3
     # via
     #   faster-whisper-server (pyproject.toml)
     #   gradio
@@ -492,7 +496,7 @@
     # via aider-chat
 semantic-version==2.10.0
     # via gradio
-setuptools==70.3.0
+setuptools==71.0.3
     # via ctranslate2
 shellingham==1.5.4
     # via typer
requirements-dev.txt
--- requirements-dev.txt
+++ requirements-dev.txt
@@ -18,6 +18,8 @@
     #   referencing
 av==12.2.0
     # via faster-whisper
+basedpyright==1.13.0
+    # via faster-whisper-server (pyproject.toml)
 certifi==2024.7.4
     # via
     #   httpcore
@@ -88,7 +90,7 @@
     #   openai
 httpx-sse==0.4.0
     # via faster-whisper-server (pyproject.toml)
-huggingface-hub==0.23.5
+huggingface-hub==0.24.0
     # via
     #   faster-whisper-server (pyproject.toml)
     #   faster-whisper
@@ -130,6 +132,8 @@
     # via markdown-it-py
 mpmath==1.3.0
     # via sympy
+nodejs-wheel-binaries==20.15.1
+    # via basedpyright
 numpy==1.26.4
     # via
     #   faster-whisper-server (pyproject.toml)
@@ -142,7 +146,7 @@
     #   pandas
 onnxruntime==1.18.1
     # via faster-whisper
-openai==1.35.14
+openai==1.35.15
     # via faster-whisper-server (pyproject.toml)
 orjson==3.10.6
     # via gradio
@@ -225,13 +229,13 @@
     # via
     #   jsonschema
     #   referencing
-ruff==0.5.2
+ruff==0.5.3
     # via
     #   faster-whisper-server (pyproject.toml)
     #   gradio
 semantic-version==2.10.0
     # via gradio
-setuptools==70.3.0
+setuptools==71.0.3
     # via ctranslate2
 shellingham==1.5.4
     # via typer
requirements.txt
--- requirements.txt
+++ requirements.txt
@@ -86,7 +86,7 @@
     #   openai
 httpx-sse==0.4.0
     # via faster-whisper-server (pyproject.toml)
-huggingface-hub==0.23.5
+huggingface-hub==0.24.0
     # via
     #   faster-whisper-server (pyproject.toml)
     #   faster-whisper
@@ -138,7 +138,7 @@
     #   pandas
 onnxruntime==1.18.1
     # via faster-whisper
-openai==1.35.14
+openai==1.35.15
     # via faster-whisper-server (pyproject.toml)
 orjson==3.10.6
     # via gradio
@@ -212,11 +212,11 @@
     # via
     #   jsonschema
     #   referencing
-ruff==0.5.2
+ruff==0.5.3
     # via gradio
 semantic-version==2.10.0
     # via gradio
-setuptools==70.3.0
+setuptools==71.0.3
     # via ctranslate2
 shellingham==1.5.4
     # via typer
Add a comment
List