Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: apply aggregate pattern in app/location
  • Loading branch information
FrankX-xzh committed Jul 24, 2021
commit 8e957d2d8fbeae264c9d9a494d83e99540d4d1db
12 changes: 12 additions & 0 deletions app/location/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@



class Locations:
def __init__(self,locations: list[Location]):
self.locations = locations

def add_service(self,location):
self.locations.append(location)

def get_location(self):
return locations



# pylint: disable=redefined-builtin,invalid-name
class Location: # pylint: disable=too-many-instance-attributes
"""
Expand Down