From 947cd5838a9facd18671a4f609a411eb8cb21d47 Mon Sep 17 00:00:00 2001 From: dullfig Date: Mon, 19 Jan 2026 21:53:32 -0800 Subject: [PATCH] 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 --- third_party/xmlable/_errors.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/third_party/xmlable/_errors.py b/third_party/xmlable/_errors.py index dea06de..644b8bb 100644 --- a/third_party/xmlable/_errors.py +++ b/third_party/xmlable/_errors.py @@ -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) )