Declare LoopState beside decode_state, as the state a reload carries

This commit was merged in pull request #130.
This commit is contained in:
2026-09-29 11:31:07 +02:00
parent 9d7eaa5453
commit 7604ec4fa7
3 changed files with 9 additions and 9 deletions
+8
View File
@@ -9,6 +9,14 @@ import typing
RELOAD_FLAG = "--reloaded"
# A field change stops a running loop at its next reload: the new script rejects the old fields.
@dataclasses.dataclass(frozen=True)
class LoopState:
cycle_number: int
root: str
task: str
def decode_state(handed, kind):
try:
fields = json.loads(handed)