Skip to content

Commit 492cf75

Browse files
Fix: remove the variable 'date'.
1 parent 252225c commit 492cf75

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

functions.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ def get_datetime():
1414
return datetime.now().strftime("%H:%M:%S")
1515

1616

17-
date = get_datetime()
18-
19-
2017
def typing_effect(text):
2118
"""
2219
Prints text with a typing effect.
@@ -302,7 +299,7 @@ def ask_to_add_task():
302299
"""
303300
Asks the user if he/she wants to add a new task.
304301
"""
305-
chatbot_message("Would you like to add a new task? [y/N]")
302+
chatbot_message("\nWould you like to add a new task? [y/N]")
306303
answer = get_str_input()[0]
307304

308305
if answer == "y":
@@ -320,7 +317,7 @@ def log(message, person):
320317
path = "log.txt"
321318

322319
with open(path, "a", newline="") as log_file:
323-
log_file.write(f"[{person}][{date}] - {message}\n")
320+
log_file.write(f"[{person}][{get_datetime()}] - {message}\n")
324321
return message
325322

326323

0 commit comments

Comments
 (0)