From 4a872a9c1cd6438a7b4ca09b53aa94df56229db7 Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Thu, 27 Nov 2025 12:58:29 +0100 Subject: [PATCH] Fix rich Table.grid call --- pyproject.toml | 3 +-- src/reactor_sim/rich_dashboard.py | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a3ee5e1..a932256 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,8 +9,7 @@ authors = [ dependencies = [] [project.optional-dependencies] -dev = ["pytest>=7.0"] -dashboard = ["rich>=13.7.0"] +dev = ["pytest>=7.0", "rich>=13.7.0"] [build-system] requires = ["setuptools>=61"] diff --git a/src/reactor_sim/rich_dashboard.py b/src/reactor_sim/rich_dashboard.py index a207638..a5d63f5 100644 --- a/src/reactor_sim/rich_dashboard.py +++ b/src/reactor_sim/rich_dashboard.py @@ -21,7 +21,10 @@ LOGGER = logging.getLogger(__name__) def _table(title: str) -> Table: - return Table.grid(expand=True, padding=(0, 1), title=title, title_style="bold cyan") + tbl = Table.grid(expand=True, padding=(0, 1)) + tbl.title = title + tbl.title_style = "bold cyan" + return tbl class RichDashboard: @@ -128,4 +131,3 @@ class RichDashboard: finally: if self.save_path and self.sim and self.sim.last_state: self.reactor.save_state(self.save_path, self.sim.last_state) -