Skip to content

Commit 8e957d2

Browse files
committed
refactor: apply aggregate pattern in app/location
1 parent ae98131 commit 8e957d2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

app/location/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55

66

77

8+
class Locations:
9+
def __init__(self,locations: list[Location]):
10+
self.locations = locations
11+
12+
def add_service(self,location):
13+
self.locations.append(location)
14+
15+
def get_location(self):
16+
return locations
17+
18+
19+
820
# pylint: disable=redefined-builtin,invalid-name
921
class Location: # pylint: disable=too-many-instance-attributes
1022
"""

0 commit comments

Comments
 (0)