| name | python |
| description | Python development standards including project structure, quality tools (uv, ruff, mypy, pytest), testing patterns, and best practices. Use whenever working in a project with pyproject.toml, setup.py, requirements.txt, or Python source files. Triggers on Python development, testing, linting, or packaging tasks. |
Python Development Standards
Apply these standards when working with Python projects.
Toolchain Summary
| Category | Tool |
|---|
| Package Manager | uv |
| Linting/Formatting | ruff |
| Type Checking | mypy (strict) |
| Testing | pytest + pytest-cov |
Key Commands
uv sync
uv run ruff format . && ruff check .
uv run mypy .
uv run pytest --cov=src
Quality Requirements
- 90% minimum test coverage
- Strict PEP 8 compliance
- 100% type annotation coverage
- Python 3.11+ with modern patterns
See reference.md for complete tooling standards and configurations.