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:
parent
0553ec294f
commit
947cd5838a
1 changed files with 1 additions and 2 deletions
3
third_party/xmlable/_errors.py
vendored
3
third_party/xmlable/_errors.py
vendored
|
|
@ -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)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue