From bb8aa2f81714d9458a32342c177373395c6b7ae6 Mon Sep 17 00:00:00 2001 From: Oleksandr Kozachuk Date: Sat, 5 Aug 2023 12:36:04 +0200 Subject: [PATCH] Fix read_file declaration. --- chatmastermind/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatmastermind/storage.py b/chatmastermind/storage.py index 4215e5a..44b21fc 100644 --- a/chatmastermind/storage.py +++ b/chatmastermind/storage.py @@ -5,7 +5,7 @@ from .utils import terminal_width, append_message, message_to_chat 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: if tags_only: return {"tags": [x.strip() for x in fd.readline().strip().split(':')[1].strip().split(',')]}