pythonlisted
Install: claude install-skill niksavis/basicly
<!-- Generated by `basicly skills-build` from skill.yaml. Do not edit; edit the source. -->
# Python
Guidance for writing and editing Python in this ecosystem. Formatting, import
order, lint, and typing are enforced by the deterministic gates (`ruff format`,
`ruff check`, `pyright`) in the pre-commit hook — never restate a linter's rules
here or send an agent to do a formatter's job. This skill carries the judgment
those gates cannot.
## Style
- Type-hint public functions, methods, and dataclass fields; let inference cover
obvious locals. A public signature is a contract — annotate it.
- Prefer `pathlib.Path` over `os.path` string munging for filesystem work.
- Do not hand-format to match the formatter. Run `ruff format` / `ruff check`
(they run in pre-commit) and let them own whitespace, quotes, and import order.
## `except A, B:` is valid here — leave it alone
This repo's floor is Python 3.14 (`requires-python = ">=3.14"`), where PEP 758
makes an unparenthesized multi-exception clause legal:
`except ValueError, OSError:` catches either type. It is **not** the Python 2
`except Error, name:` capture form and not a syntax error — `src/basicly/decompose.py`
uses it and imports fine. Do not add parentheses to "fix" it; that is a no-op
diff, and stopping to re-verify that the module parses costs a whole detour.
Parentheses are still required when the clause binds the exception —
`except (ValueError, OSError) as err:`. Dropping them there raises
`SyntaxError: multiple e