Ultra-strict Python template v2 (uv + ruff + basedpyright)

Posted by Ranteck@reddit | Python | View on Reddit | 63 comments

Some time ago I shared a strict Python project setup. I’ve since reworked and simplified it, and this is the new version.

pystrict-strict-python – an ultra-strict Python project template using uv, ruff, and basedpyright, inspired by TypeScript’s --strict mode.

Compared to my previous post, this version:

What it gives you

Use cases

```bash uv venv .venv\Scripts\activate # Windows # or: source .venv/bin/activate

uv pip install -e ".[dev]" ```

Then your daily loop is basically:

bash uv run ruff format . uv run ruff check . --fix uv run basedpyright uv run pytest

and progressively tighten things as you fix issues.

Why I built this v2

The first version worked, but it was a bit heavier and less focused. In this iteration I wanted:

Repo

👉 GitHub link here

If you saw my previous post and tried that setup, I’d love to hear how this version compares. Feedback very welcome: