tests: type queued tasks in the upstream bridge

Player.queue holds BaseTask instances, so the bridge's queue encoder
takes BaseTask too. ty flagged this once it covered the tests.
This commit is contained in:
Dash committed 2026-10-17 15:56:00 +02:00
1 parent fd4a7d151d
commit ed5c5cbdc3
1 file changed
+2 -2
+2 -2
View File
@@ -11,9 +11,9 @@ from pqcli.config import EquipmentType, Monster, StatType
from pqcli.game_data import GameData
from pqcli.lingo import to_roman
from pqcli.mechanic import (
BaseTask,
Player,
PlotTask,
RegularTask,
Simulation,
Stats,
)
@@ -106,7 +106,7 @@ def make_spec(seed: str, race: str, class_: str) -> dict[str, Any]:
}
def _queue_entry(task: RegularTask) -> str:
def _queue_entry(task: BaseTask) -> str:
kind = "plot" if isinstance(task, PlotTask) else "task"
text = "Loading" if isinstance(task, PlotTask) else task.description
return f"{kind}|{task.duration // 1000}|{text}"