Fix termcolor compatibility in vendored xmlable

Remove unused Color type import from termcolor.termcolor which doesn't
exist in newer termcolor versions. Change type hints from Color to str.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
dullfig 2026-01-19 21:53:32 -08:00
parent 0553ec294f
commit 947cd5838a

View file

@ -7,12 +7,11 @@ Colourful & descriptive errors for xmlable
from dataclasses import dataclass
from typing import Any, Iterable
from termcolor import colored
from termcolor.termcolor import Color
from ._utils import typename, AnyType
def trace_note(trace: list[str], arrow_c: Color, node_c: Color):
def trace_note(trace: list[str], arrow_c: str, node_c: str):
return colored(" > ", arrow_c).join(
map(lambda x: colored(x, node_c), trace)
)