ProBoard
Other
OtherVeröffentlicht 7. Okt.

Tkinter todo: saving appends instead of overwriting

Every save appends the whole list to `todos.txt`, so the file grows and items duplicate on load.

Beschreibung

Desktop todo app (Tkinter), persistence in `todo/model.py`. Problem: saving twice duplicates every task in `todos.txt`, and after a restart the list is full of copies. `save()` must rewrite the file with the current state. Expected: - `save()` writes the current list only; - save -> add -> save leaves exactly the current number of lines; - `load()` keeps restoring the done state. Acceptance: `python -m unittest discover -s tests` passes. DM me, I'll share the repo and a short video of the bug.

Fähigkeiten

  • Python
  • Tkinter
Tkinter todo: saving appends instead of overwriting — ProBoard