Commit c5ce11d
refactor: inline
The `reason = state.status.reason` local was read exactly once on the
next line as the `reason=` kwarg to `RunStoppedData(...)`. Collapsing
to `reason=state.status.reason` matches the inline-alias pattern from
ce487d3 (`text`) / 52e0272 (`msg`) / 497c028 (`agent`) / fc5e1cb
(`total_in`).
The property access is safe at this call site: the immediately-preceding
`if state.status == RunStatus.RUNNING: state.status = RunStatus.COMPLETED`
ensures `state.status` is always a terminal status (STOPPED / COMPLETED
/ FAILED), so `RunStatus.reason` cannot raise.
Co-authored-by: Ralphify <noreply@ralphify.co>reason alias in run_loop stop-event emit1 parent bc13035 commit c5ce11d
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
373 | 372 | | |
374 | 373 | | |
375 | 374 | | |
376 | | - | |
| 375 | + | |
377 | 376 | | |
378 | 377 | | |
379 | 378 | | |
| |||
0 commit comments