← ClaudeAtlas

python-stylelisted

Use when choosing a type annotation, deciding what shape a record takes as it crosses a boundary, or asking whether a comment belongs here. Owns the 3.13 house interpreter floor for a new deployable project and a distributed package's floor being its consumers', `X | None` over `Optional`, the ban on `from __future__ import annotations`, immutable collection types, when a type error may be silenced inline, the rule that a fixed-shape record is a declared type rather than a bare `dict` or tuple, which builtin represents an exact decimal quantity, an instant and an identifier, and a closed set of constants as an `Enum`. What to log and which scope logs it is `python-logging`; whether a constrained scalar also earns a named type of its own belongs to the architecture family; the error classes themselves are `exception-catalog`.
wntic/pyhouse · ★ 3 · AI & Automation · score 76
Install: claude install-skill wntic/pyhouse
# Python Style Project-wide rules that are stricter than CPython's defaults and hold **whatever the architecture is** — a hexagonal app, a flat-layered worker, or a standalone script. Two subjects: what the types look like, and where a comment is warranted. ## When to use vs. neighbours - Writing or changing any annotation, or any comment → this skill. - Any log call, event name or logging configuration → `python-logging`. - One class per module, `__all__`, the `__init__.py` re-export contract, import forms → `python-packaging`. - Deriving a concrete class or module name → `naming`; deriving a concrete artifact *path* in a hexagonal project → `hex-conventions`, in the `pyhouse-hex` plugin. - The exception classes themselves → `exception-catalog`. - Where a module lives and what may import it → `hex-architecture` (in the `pyhouse-hex` plugin) or `flat-layered` (in `pyhouse-flat`), whichever style the project uses. - The shape of a specific artifact → its own skill. This skill is consulted **alongside** them. ## Typing ### `X | None`, not `Optional[X]` ```python # yes name: str | None = None def find(id: UUID) -> Foo | None: ... # no from typing import Optional name: Optional[str] = None ``` PEP 604 union syntax is the default. `Union[A, B]` is equally banned — write `A | B`. This holds everywhere, validation models included. ### Never `from __future__ import annotations` Do not add this import to any module. Projects in this style rely on **runtime annotati