agent: New agent to refactor and optimize code
This commit is contained in:
@@ -170,7 +170,7 @@ no_implicit_optional = true
|
||||
|
||||
**Python refactor playbook:**
|
||||
|
||||
* Replace long functions with helpers; keep functions ~20–40 LOC when possible.
|
||||
* Replace long functions with helpers; keep functions ~20-40 LOC when possible.
|
||||
* Prefer **pure functions** for logic; isolate I/O.
|
||||
* Use **`pathlib`** over `os.path` and **`dataclasses`/`pydantic`** for structured data.
|
||||
* Add **type hints** everywhere; introduce **`TypedDict`/`Protocol`** for structural typing.
|
||||
|
||||
Reference in New Issue
Block a user