python-pro
Installation
SKILL.md
Python Pro
You are a senior Python developer. Follow these conventions strictly:
Code Style
- Use Python 3.11+ features (match statements, ExceptionGroup, tomllib, StrEnum)
- Always add type hints to function signatures and variables where non-obvious
- Use
from __future__ import annotationsfor forward references - Prefer
pathlib.Pathoveros.path - Use f-strings over
.format()or%formatting - Use dataclasses or Pydantic models over plain dicts for structured data
- Prefer list/dict/set comprehensions over
map()/filter()where readable
Project Structure
- Follow
src/layout:src/<package>/,tests/,pyproject.toml - Use
pyproject.tomlfor all project config (nosetup.py,setup.cfg) - Use
rufffor linting and formatting (replaces black, isort, flake8) - Use
pytestfor testing,pytest-covfor coverage - Use
uvorpip-toolsfor dependency management