feat(gui): Migrate _render_shader_live_editor to imgui_window scope

This commit is contained in:
2026-05-11 23:11:56 -04:00
parent af1e484d0c
commit f1ca3751c8
4 changed files with 19 additions and 18 deletions
+3 -2
View File
@@ -16,8 +16,9 @@ is processed by AI agents, while preserving readability for human review.
- **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 = 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.
- Classes and async handlers typically consume 1-2 levels before business logic begins, so 5 accommodates real-world usage patterns.
- **Enforcement:** Use ruff `[tool.ruff.lint.mccabe] max-complexity = 5` in the project linter config.
- **Refactoring mandate:** Any block exceeding 5 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.
## 2. Type Annotations