chore: Update pyproject.toml with venv and basedpyright configuration

This commit is contained in:
Stan Girard 2024-09-09 11:35:50 +02:00
parent 2a2f823e7d
commit af6db28d80
2 changed files with 14 additions and 1 deletions

View File

@ -16,4 +16,4 @@ mkdocs:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: backend/requirements.lock
- requirements: backend/docs/requirements.lock

View File

@ -26,8 +26,21 @@ dev-dependencies = []
virtual = true
[tool.rye.scripts]
venv_create = "uv venv ./.venv"
venv_sync= "uv pip sync --python ./.venv/bin/python ./requirements.lock"
venv_create_sync = {chain = ["venv_create", "venv_sync"]}
check_deps = "basedpyright --project ./pyproject.toml"
docs = "mkdocs serve"
[tool.basedpyright]
include = ["src/"]
# Ensure that it uses the .venv that we created for this project with the lockfile
venvPath="./"
venv=".venv"
# We really only care about some import issues, so we disable everything and report on missing imports:
typeCheckingMode = "off"
reportMissingImports = true
[tool.hatch.metadata]
allow-direct-references = true