Type stubs for celery related projects:
pip install celery-typesYou'll also need to monkey patch Task so generic params can be provided:
from celery.app.task import Task
Task.__class_getitem__ = classmethod(lambda cls, *args, **kwargs: cls) # type: ignore[attr-defined]# install uv (https://docs.astral.sh/uv/)
curl -LsSf https://astral.sh/uv/install.sh | shuv sync# run formatting, linting, and typechecking
s/lintor
uv run ruff check --fix
uv run ruff format
uv run basedpyright typings tests
uv run mypy tests# build and publish
uv build && uv publishThe project uses pre-commit for code quality checks:
# install pre-commit hooks
uv run prek install
# run all checks manually
uv run prek run --all-files- ruff — formatting and linting
- basedpyright — type checking
- mypy — type checking