diff --git a/.gitignore b/.gitignore index 19e0f43..5eb489a 100644 --- a/.gitignore +++ b/.gitignore @@ -959,3 +959,4 @@ FodyWeavers.xsd # Additional files built by Visual Studio # End of https://www.toptal.com/developers/gitignore/api/vim,node,data,emacs,python,pycharm,executable,sublimetext,visualstudio,visualstudiocode +.markata.cache diff --git a/marvin_sw_text_adventure/__main__.py b/marvin_sw_text_adventure/__main__.py index 3a253e6..399e4d5 100644 --- a/marvin_sw_text_adventure/__main__.py +++ b/marvin_sw_text_adventure/__main__.py @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT import sys -if __name__ == '__main__': - from .cli import marvin_sw_text_adventure.game import game +if __name__ == "__main__": + from marvin_sw_text_adventure.game import game sys.exit(game()) diff --git a/marvin_sw_text_adventure/cli/app.py b/marvin_sw_text_adventure/cli/app.py index 4ad14d6..361b66c 100644 --- a/marvin_sw_text_adventure/cli/app.py +++ b/marvin_sw_text_adventure/cli/app.py @@ -1,8 +1,8 @@ import typer from marvin_sw_text_adventure.cli.common import verbose_callback -from marvin_sw_text_adventure.console import console from marvin_sw_text_adventure.cli.game import game_app + # from marvin_sw_text_adventure.cli.config import config_app # from marvin_sw_text_adventure.cli.tui import tui_app diff --git a/marvin_sw_text_adventure/cli/game.py b/marvin_sw_text_adventure/cli/game.py index 3c82ec9..b6f6e2c 100644 --- a/marvin_sw_text_adventure/cli/game.py +++ b/marvin_sw_text_adventure/cli/game.py @@ -1,4 +1,3 @@ -from rich.console import Console import typer from marvin_sw_text_adventure.cli.common import verbose_callback @@ -27,5 +26,6 @@ def run( ), ): from marvin_sw_text_adventure.console import console + console.log("Starting game") game_run() diff --git a/marvin_sw_text_adventure/game.py b/marvin_sw_text_adventure/game.py index b6c2c02..41bf28f 100644 --- a/marvin_sw_text_adventure/game.py +++ b/marvin_sw_text_adventure/game.py @@ -1,5 +1,5 @@ -from typing import List, Tuple import atexit +from typing import List, Tuple from marvin import ai_fn import pydantic @@ -9,6 +9,7 @@ from rich.prompt import Prompt from rich.table import Table from marvin_sw_text_adventure.console import console +from numpy import character @ai_fn @@ -201,7 +202,7 @@ def create_character() -> StarWarsCharacter: def game(): console.print("generating your character") - prompt = Prompt() + prompt = Prompt(console=console) character = create_character() game = create_game(character) diff --git a/pyproject.toml b/pyproject.toml index 5367205..cc3a08a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,9 @@ dependencies = [ ] [tool.hatch.envs.default.scripts] game = 'marvin-sw-text-adventure game run' +lint = "ruff marvin_sw_text_adventure" +fix = "ruff marvin_sw_text_adventure --fix" +format = "black marvin_sw_text_adventure" [[tool.hatch.envs.test.matrix]] python = ["37", "38", "39", "310", "311"]