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>
|
||||
|
||||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue