Fix breakage caused by Color no longer being iterable

This commit is contained in:
Kovid Goyal 2021-11-07 07:15:55 +05:30
parent 69e54cb9c1
commit 0f23edeec3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -447,8 +447,8 @@ class LineParser:
def parse_theme(fname: str, raw: str, exc_class: Type[BaseException] = SystemExit) -> Dict[str, Any]:
lines = raw.splitlines()
conf = parse_config(lines)
bg = conf.get('background', Color())
is_dark = max(bg) < 115
bg: Color = conf.get('background', Color())
is_dark = max((bg.red, bg.green, bg.blue)) < 115
ans: Dict[str, Any] = {'name': theme_name_from_file_name(fname)}
parser = LineParser()
for i, line in enumerate(raw.splitlines()):