From b64d1aa95a2a9752c392f0298900986bdf4b89de Mon Sep 17 00:00:00 2001 From: Liam Egan Date: Wed, 23 Sep 2026 11:32:31 -0400 Subject: [PATCH] Update Python agent conventions --- agents/conventions/python.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/agents/conventions/python.md b/agents/conventions/python.md index 250145b..7ef69c2 100644 --- a/agents/conventions/python.md +++ b/agents/conventions/python.md @@ -1,3 +1,24 @@ # Python Conventions -- Avoid the `dataclasses.field` helper. Prefer `init=False` and a custom `__init__`. +## Code Style + +- Follow the existing project's formatter, linter, supported Python version, and +local conventions first. +- Write clear, idiomatic Python; prefer simple control flow and the standard +library where appropriate. +- Add type annotations for public APIs and non-obvious values when the project +uses typing; do not introduce a new typing style into an established codebase. +- Keep imports organized according to the project's tooling. Do not leave unused +imports. + +## Naming + +- Do not name internal or private functions, methods, attributes, or variables +with leading underscores. + +## Declarations + +- Do not use `*` or `/` parameter markers in function signatures; avoid +keyword-only and positional-only parameter declarations. +- Avoid the `dataclasses.field` helper. Prefer `init=False` and a custom +`__init__`. -- knotmirror 0.0.1