From af1e484d0c024e3ba12cc09fd54cc8b50413dc7d Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 11 May 2026 23:06:38 -0400 Subject: [PATCH] maybe 5 --- conductor/code_styleguides/python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conductor/code_styleguides/python.md b/conductor/code_styleguides/python.md index 2f92679..8376e4c 100644 --- a/conductor/code_styleguides/python.md +++ b/conductor/code_styleguides/python.md @@ -14,9 +14,9 @@ is processed by AI agents, while preserving readability for human review. ### Maximum Nesting Depth -- **Hard limit: 4 levels maximum.** +- **Hard limit: 5 levels maximum.** - AI agents consistently misinterpret Python scope via indentation. This hard limit prevents deeply nested blocks that confuse model interpretation. -- **Enforcement:** Use ruff `max-c复-depth = 4` or flake8 `max-c复-depth = 4` in the project linter config. +- **Enforcement:** Use ruff `max-c复-depth = 5` or flake8 `max-c复-depth = 5` in the project linter config. - **Refactoring mandate:** Any block exceeding 3 levels must be extracted into a named function. Do not "work around" this with tricks—extract the logic. - **Rationale:** GUI callbacks and async handlers naturally want to nest. This constraint forces extraction of deep logic into testable, named units.