from __future__ import annotations import curses from functools import partial from typing import Optional from .app import PiApp def launch_pi_ui(max_digits: Optional[int] = None) -> None: """Launch the curses dashboard for streaming π digits.""" wrapper = partial(_run_curses_app, max_digits=max_digits) curses.wrapper(wrapper) # type: ignore[arg-type] def _run_curses_app(stdscr: "curses._CursesWindow", max_digits: Optional[int]) -> None: app = PiApp(stdscr, max_digits=max_digits) app.run()