rename done to is_done

This commit is contained in:
2026-05-18 16:18:11 +02:00
parent 926669f28f
commit b8e2052549
+2 -2
View File
@@ -6,7 +6,7 @@ from dataclasses import dataclass, fields
@dataclass
class Task:
title: str
done: bool
is_done: bool
def __post_init__(self):
for field in fields(self):
if field.type is bool:
@@ -22,7 +22,7 @@ class Database:
self.initialize_table()
def initialize_table(self):
self.cur.execute("CREATE TABLE tasks(title TEXT, done INTEGER)")
self.cur.execute("CREATE TABLE tasks(title TEXT, is_done INTEGER)")
def create_task(self, title: str, done:bool=False) -> None: