← ClaudeAtlas

python-patternslisted

Python language-level patterns - type hints, strictness, project layout, async, error handling, packaging, and review-worthy anti-patterns. Use whenever the project contains `.py` files or a Python manifest (`pyproject.toml`, `requirements.txt`, `Pipfile`, `uv.lock`, `poetry.lock`), OR the user asks about Python, its typing and type checkers, its async model, or its packaging and project structure, even if "Python" is not mentioned by name.
ku5ic/dotfiles · ★ 0 · Web & Frontend · score 72
Install: claude install-skill ku5ic/dotfiles
# Python patterns Default assumption: Python 3.11 or later, type hints required on public function signatures, mypy or pyright in strict mode. - 3.11 is the floor: `TaskGroup`, `Self`, `StrEnum`, and `ExceptionGroup` all landed there. - 3.14 (current stable since 2025-10-07, latest 3.14.7) made deferred annotation evaluation the default; on older supported versions, `from __future__ import annotations` is still useful for forward references. - Adapt advice to the version in the project's `.tool-versions`, `pyproject.toml`, or `.python-version`. ## Reference files | File | Covers | | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | | [reference/typing.md](reference/typing.md) | Type hints, strictness, mypy/pyright per-module overrides | | [reference/project-layout.md](reference/project-layout.md) | `src/` layout, `pyproject.toml`, packaging, `py.typed` (PEP 561), namespace packages (PEP 420) | | [reference/async.md](reference/async.md) | `async def` hazards, `TaskGroup`, `anyio` cancellation scopes | | [reference/errors.md](reference/errors.md) | Exception design, chaining, LBYL vs EAFP, `logger.e