-
-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
I am writing a logger with termcolor, and want to use Attribute
, Color
& Highlight
from termcolor._types
.
I am using mypy with aggressive type-checking so it will not type check unless I import the types (or ignore the error).
class ColorFormatter:
FORMATS: ClassVar[dict[int, tuple[Color, list[Attribute] | None]]] = {
logging.DEBUG: ("grey", None),
logging.INFO: ("white", None),
logging.WARNING: ("yellow", ["bold"]),
logging.ERROR: ("red", ["bold"]),
logging.CRITICAL: ("magenta", ["underline", "bold"]),
}
Is it possible to export the types from __init__.py
?
Josef-Friedrich, MaT-PT, blankRiot96, renpe and rarescosma
Metadata
Metadata
Assignees
Labels
No labels