← ClaudeAtlas

python-patternslisted

Python language-level patterns covering type hints, strictness, project layout, async, error handling, packaging, and review-worthy anti-patterns. Use whenever the project contains `.py` files, `pyproject.toml`, `requirements.txt`, `Pipfile`, `uv.lock`, `poetry.lock`, OR the user asks about Python, type hints, mypy, pyright, async, packaging, project structure, or any work in a `.py` file, 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 because TaskGroup, `Self`, `StrEnum`, and `ExceptionGroup` all landed there. 3.14 (current stable, released 2025-10-07) made deferred annotation evaluation the default; on older supported versions the `from __future__ import annotations` import is still useful for forward references. Adapt advice to the version in the project's `.tool-versions`, `pyproject.toml`, or `.python-version`. ## Severity rubric - `failure`: a concrete defect or violation that should not ship. - `warning`: a smell or pattern that compounds with other findings. - `info`: a hardening opportunity or note, not a defect. ## 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) | `asy