in main.py [0:0]
def push_error(edict: dict, filepath: str, errmsg: typing.Union[str, list]):
"""Push an error message to the error dict, creating an entry if none exists, otherwise appending to it"""
if filepath not in edict:
edict[filepath] = list()
if isinstance(errmsg, list):
edict[filepath].extend(errmsg)
else:
edict[filepath].append(errmsg)