Files
ProgressQuest-cli/pqcli/ui/base.py
T
Dash 0a4358e2b8 misc: drop typing as T, use builtin generics
Python 3.10 is the minimum, so annotations use `X | None`, `list[X]`
and friends, enforced by ruff's pyupgrade rules. The remaining typing
names are imported directly, with abstract types coming from
collections.abc. first() is now generic over the item and default.
2026-10-17 15:55:55 +02:00

25 lines
540 B
Python

import abc
import argparse
from pqcli.game_data import GameData
from pqcli.mechanic import Player
from pqcli.roster import Roster
class BaseUserInterface(abc.ABC):
def __init__(
self,
roster: Roster,
player: Player | None,
args: argparse.Namespace,
data: GameData,
) -> None:
self.roster = roster
self.data = data
self.args = args
self.player = player
@abc.abstractmethod
def run(self) -> None:
raise NotImplementedError("not implemented")