Skip to content

Commit

Permalink
ci(python): add typecheck for lance/debug.py,tracing.py,dependencies.…
Browse files Browse the repository at this point in the history
…py (#3297)

Co-authored-by: Lei Xu <[email protected]>
  • Loading branch information
yanghua and eddyxu authored Jan 2, 2025
1 parent 33c45c8 commit 6e7010a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6e7010a

Please sign in to comment.