mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-08-03 05:18:22 +00:00
Bind a property's rename callback without a default-argument trick 🟪
partial binds plan eagerly and without introducing a parameter the caller never passes, so there is no late-binding question to reason about. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
35a3ebe0e3
commit
3e6464fb15
1 changed files with 2 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ turn a productive run red. Missing folders likewise do not fail a run.
|
|||
"""
|
||||
|
||||
import os
|
||||
from functools import partial
|
||||
from typing import Any
|
||||
from uuid import UUID
|
||||
|
||||
|
|
@ -104,7 +105,7 @@ def handler(
|
|||
continue
|
||||
subtask = orchestrator.create_child_subtask(task_id, inputs=_plan_json(plan))
|
||||
orchestrator.run_subtask(
|
||||
subtask.id, work=lambda p=plan: _record(renamer, p, summary)
|
||||
subtask.id, work=partial(_record, renamer, plan, summary)
|
||||
)
|
||||
return _summary_json(summary)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue