mirror of
https://github.com/rr-/pq-cli.git
synced 2026-11-12 22:40:36 -07:00
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.
25 lines
540 B
Python
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")
|