A couple fixes in items.py
Reformat the items in items.py Fix the type declaration of Item.background_color
This commit is contained in:
parent
30727ccac1
commit
64844d124b
1 changed files with 9 additions and 6 deletions
|
@ -1,7 +1,8 @@
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Tuple
|
from typing import Optional, Tuple
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class Item:
|
class Item:
|
||||||
|
@ -27,9 +28,11 @@ class Item:
|
||||||
name: str
|
name: str
|
||||||
description: str
|
description: str
|
||||||
foreground_color: Tuple[int, int, int]
|
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",
|
Corpse = Item(
|
||||||
description="The corpse of a once-living being",
|
'%',
|
||||||
foreground_color=(128, 128, 255))
|
name="Corpse",
|
||||||
|
description="The corpse of a once-living being",
|
||||||
|
foreground_color=(128, 128, 255))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue