Skip to content

Commit

Permalink
227 refactor duplicate logic
Browse files Browse the repository at this point in the history
  • Loading branch information
melvio committed Apr 13, 2022
1 parent a328ce6 commit ccc1182
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 247 deletions.
7 changes: 4 additions & 3 deletions src/hopla/hoplalib/hatchery/egg_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
class EggData:
"""Class with data about eggs."""

drop_egg_names = [
drop_egg_names: List[str] = [
"BearCub", "Cactus", "Dragon", "FlyingPig", "Fox", "LionCub",
"PandaCub", "TigerCub", "Wolf"
]
"""
Drop eggs. This is list was retrieved using: `hopla api content | jq .dropEggs | jq. keys`
"""

quest_egg_names = [
quest_egg_names: List[str] = [
"Alligator", "Armadillo", "Axolotl", "Badger", "Beetle", "Bunny",
"Butterfly", "Cheetah", "Cow", "Cuttlefish", "Deer", "Dolphin", "Egg",
"Falcon", "Ferret", "Frog", "Gryphon", "GuineaPig", "Hedgehog",
Expand All @@ -28,7 +28,8 @@ class EggData:
"Whale", "Yarn"
]
"""
Quest Eggs. This is list was retrieved using: `hopla api content | jq .questEggs | jq keys`
Quest Eggs. This is list was retrieved using:
hopla api content | jq .questEggs | jq keys
"""

egg_names: List[str] = drop_egg_names + quest_egg_names
Expand Down
7 changes: 5 additions & 2 deletions src/hopla/hoplalib/hatchery/hatchpotion_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class HatchPotionData:
"Red", "Shade", "Skeleton", "White", "Zombie"
]
"""
Drop hatching potions. This list was retrieved by using:
Drop hatching potions. Also known as 1st gen potions.
This list was retrieved by using:
hopla api content | jq.dropHatchingPotions | jq keys
"""

Expand All @@ -32,9 +33,11 @@ class HatchPotionData:
"""

wacky_hatch_potion_names = ["Dessert", "Veggie", "VirtualPet"]
"""Wacky hatching potions. This list was retrieved by using:
"""
Wacky hatching potions. This list was retrieved by using:
hopla api content | jq '.wackyHatchingPotions|keys'
"""

non_drop_hatch_potion_names: List[str] = (
magic_hatch_potion_names
+ wacky_hatch_potion_names
Expand Down
2 changes: 1 addition & 1 deletion src/hopla/hoplalib/hoplaversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

MAJOR_VERSION: Final[int] = 0
MINOR_VERSION: Final[int] = 0
PATCH_VERSION: Final[int] = 29
PATCH_VERSION: Final[int] = 30
PRE_RELEASE: Final[Optional[str]] = "alpha"


Expand Down
Loading

0 comments on commit ccc1182

Please sign in to comment.