Changes from https://github.com/juk0de/ChatMastermind.git #1
@ -7,7 +7,7 @@ from typing import List, Dict, Any, Optional
|
||||
|
||||
def read_file(fname: pathlib.Path, tags_only: bool = False) -> Dict[str, Any]:
|
||||
with open(fname, "r") as fd:
|
||||
tagline = fd.readline().strip().split(':')[1].strip()
|
||||
tagline = fd.readline().strip().split(':', maxsplit=1)[1].strip()
|
||||
# also support tags separated by ',' (old format)
|
||||
separator = ',' if ',' in tagline else ' '
|
||||
tags = [t.strip() for t in tagline.split(separator)]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user