From 64844d124b2c79957dad8c17156efd369e250aae Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 18 Feb 2023 22:57:37 -0800 Subject: [PATCH] A couple fixes in items.py Reformat the items in items.py Fix the type declaration of Item.background_color --- erynrl/items.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/erynrl/items.py b/erynrl/items.py index eafd248..4c76f0b 100644 --- a/erynrl/items.py +++ b/erynrl/items.py @@ -1,7 +1,8 @@ # Eryn Wells from dataclasses import dataclass -from typing import Tuple +from typing import Optional, Tuple + @dataclass(frozen=True) class Item: @@ -27,9 +28,11 @@ class Item: name: str description: str foreground_color: Tuple[int, int, int] - background_color: Tuple[int, int, int] = None + background_color: Optional[Tuple[int, int, int]] = None -Corpse = Item('%', - name="Corpse", - description="The corpse of a once-living being", - foreground_color=(128, 128, 255)) + +Corpse = Item( + '%', + name="Corpse", + description="The corpse of a once-living being", + foreground_color=(128, 128, 255))