File tree 2 files changed +1
-26
lines changed
2 files changed +1
-26
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
3
3
pip install --upgrade pip
4
4
pip install black codespell flake8 isort mypy pytest pyupgrade tox
Original file line number Diff line number Diff line change @@ -77,14 +77,6 @@ def buy_pet(self, name: str) -> Pet:
77
77
return pet
78
78
79
79
80
- # Additional factories:
81
-
82
-
83
- # Create a random animal
84
- def random_animal (name : str ) -> Pet :
85
- """Let's be dynamic!"""
86
- return random .choice ([Dog , Cat ])(name )
87
-
88
80
89
81
# Show pets with various factories
90
82
def main () -> None :
@@ -95,27 +87,10 @@ def main() -> None:
95
87
Here is your lovely Cat<Lucy>
96
88
>>> pet.speak()
97
89
meow
98
-
99
- # A shop that sells random animals
100
- >>> shop = PetShop(random_animal)
101
- >>> for name in ["Max", "Jack", "Buddy"]:
102
- ... pet = shop.buy_pet(name)
103
- ... pet.speak()
104
- ... print("=" * 20)
105
- Here is your lovely Cat<Max>
106
- meow
107
- ====================
108
- Here is your lovely Dog<Jack>
109
- woof
110
- ====================
111
- Here is your lovely Dog<Buddy>
112
- woof
113
- ====================
114
90
"""
115
91
116
92
117
93
if __name__ == "__main__" :
118
- random .seed (1234 ) # for deterministic doctest outputs
119
94
shop = PetShop (random_animal )
120
95
import doctest
121
96
You can’t perform that action at this time.
0 commit comments