Files
hkuds--deeptutor/scripts/_cli_kit.py
T
wehub-resource-sync e4dcfc49aa
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:00:43 +08:00

32 lines
615 B
Python

from __future__ import annotations
import sys
def _ensure_replace_errors() -> None:
try:
if getattr(sys.stdout, "errors", None) != "replace":
sys.stdout.reconfigure(errors="replace")
except Exception:
pass
_ensure_replace_errors()
def banner(title: str, lines: list[str] | tuple[str, ...] = ()) -> None:
print(f"== {title} ==")
for line in lines:
print(str(line))
def log_success(message: str) -> None:
print(f"[ok] {message}")
def log_error(message: str) -> None:
print(f"[error] {message}")
__all__ = ["banner", "log_error", "log_success"]