Commit 0a72d14
fix: inverted loop condition in chaos_machine.py prevents execution (#14777)
* fix: inverted loop condition in chaos_machine.py prevents execution
The while loop condition was inverted — it
should be . The loop that pulls output
data and prompts the user for exit never executed.
Also:
- Add type hints to all functions
- Add module-level docstring with references
- Add docstrings with doctests to pull()
- Fix reset() to copy K instead of aliasing it (prevented repeated reset)
- Remove deprecated in favor of built-in
* Apply batched suggestions from code review
Co-authored-by: Christian Clauss <cclauss@me.com>
---------
Co-authored-by: Christian Clauss <cclauss@me.com>1 parent 7f81fcd commit 0a72d14
1 file changed
Lines changed: 42 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
2 | 11 | | |
3 | 12 | | |
4 | 13 | | |
| |||
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
16 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
17 | 34 | | |
18 | 35 | | |
19 | 36 | | |
| |||
39 | 56 | | |
40 | 57 | | |
41 | 58 | | |
42 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
43 | 73 | | |
44 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
45 | 82 | | |
46 | 83 | | |
47 | 84 | | |
| |||
70 | 107 | | |
71 | 108 | | |
72 | 109 | | |
| 110 | + | |
73 | 111 | | |
74 | 112 | | |
75 | | - | |
| 113 | + | |
76 | 114 | | |
77 | 115 | | |
78 | 116 | | |
| |||
0 commit comments