chore: refactor imports and adopt new utils utilities

This commit is contained in:
sankalp committed 2026-07-14 18:45:52 +05:45
1 parent b2114f52b1
commit 6f2d0bf444
65 files changed
+221 -266

No files matched your search

+3 -2
View File
@@ -47,10 +47,11 @@ class TodoService(Service):
def _load_todos(self):
"""Load todos from JSON file"""
from utils.functions import read_json_file
try:
if self._file_path.exists():
with open(self._file_path, encoding="utf-8") as f:
self._todos = json.load(f)
self._todos = read_json_file(str(self._file_path)) or []
else:
self._todos = []
except Exception as e: