writing-pythonlisted
Install: claude install-skill AleksandarBisevac/claude-plugins
# Writing Python here
Not a general Python style guide. This repo bans things most guides mandate, and the bans are
read out of the AST rather than trusted — `_output.house_style_violations()` fails the build, it
does not warn. Everything below is either enforced or measured from the tree as it stands.
## The dialect, in one paragraph
Stdlib only. Python 3.8 floor. **No `typing`, no `dataclasses`, no annotations, no walrus, no
`from __future__`** — banned by AST, because hooks start on every tool call and the import and
parse cost is real. `%`-style formatting; there is not one f-string in the tree. Reach for
`os.path`, `json`, `re`, `subprocess` — not for a dependency.
3.8 also rules out things that read as ordinary today: no `X | Y` unions, no `match`, no
`dict1 | dict2` merge, no `list[str]`. `vermin -t=3.8-` catches these; it will not catch the
banned imports, which is why the AST lint exists alongside it.
## Free functions, structured returns
The measured shape of this codebase: **734 top-level functions against 6 classes**, 227
comprehensions, and **6 `global` statements in ~42,000 lines**. That is the pattern to keep.
- **Write a function, not a class.** A class here needs a reason you can say out loud — the six
that exist are all genuine (a lock, a launcher). Grouping related functions is what a module
prefix is for.
- **Return a new value; do not mutate an argument.** 181 functions return a dict or tuple. A
function that edits the caller's dict in place