From 6e7010aa9fe7f55800d5fb9c7cdaa8f23b866517 Mon Sep 17 00:00:00 2001 From: vinoyang Date: Fri, 3 Jan 2025 00:52:49 +0800 Subject: [PATCH] ci(python): add typecheck for lance/debug.py,tracing.py,dependencies.py (#3297) Co-authored-by: Lei Xu --- .github/workflows/python.yml | 3 ++- python/pyproject.toml | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index fb677eab8e..e716a0d6f6 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -54,12 +54,13 @@ jobs: workspaces: python - name: Install linting tools run: | - pip install ruff==0.4.1 maturin tensorflow tqdm ray[data] + pip install ruff==0.4.1 maturin tensorflow tqdm ray[data] pyright datasets polars[pyarrow,pandas] pip install torch --index-url https://download.pytorch.org/whl/cpu - name: Lint Python run: | ruff format --check python ruff check python + pyright - name: Install dependencies run: | sudo apt update diff --git a/python/pyproject.toml b/python/pyproject.toml index b08b6bdc89..68f8160b06 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -72,7 +72,12 @@ lint.select = ["F", "E", "W", "I", "G", "TCH", "PERF", "B019"] [tool.pyright] pythonVersion = "3.12" # TODO: expand this list as we fix more files. -include = ["python/lance/util.py"] +include = [ + "python/lance/util.py", + "python/lance/debug.py", + "python/lance/tracing.py", + "python/lance/dependencies.py", +] # Dependencies like pyarrow make this difficult to enforce strictly. reportMissingTypeStubs = "warning" reportImportCycles = "error"