Compare commits

...

2 Commits

Author SHA1 Message Date
ok 1bb553b223 Merge branch 'main' of stage.fjerkroa.no:ok/ChatMastermind 2023-08-05 12:36:13 +02:00
ok bb8aa2f817 Fix read_file declaration. 2023-08-05 12:36:04 +02:00
+1 -1
View File
@@ -5,7 +5,7 @@ from .utils import terminal_width, append_message, message_to_chat
from typing import List, Dict, Any, Optional from typing import List, Dict, Any, Optional
def read_file(fname: str, tags_only: bool = False) -> Dict[str, Any]: def read_file(fname: pathlib.Path, tags_only: bool = False) -> Dict[str, Any]:
with open(fname, "r") as fd: with open(fname, "r") as fd:
if tags_only: if tags_only:
return {"tags": [x.strip() for x in fd.readline().strip().split(':')[1].strip().split(',')]} return {"tags": [x.strip() for x in fd.readline().strip().split(':')[1].strip().split(',')]}