Skip to content

Instantly share code, notes, and snippets.

@zehpatricio
Created March 30, 2022 20:14
Show Gist options
  • Save zehpatricio/2c5c8d2729d0e5d2572235989e132f25 to your computer and use it in GitHub Desktop.
Save zehpatricio/2c5c8d2729d0e5d2572235989e132f25 to your computer and use it in GitHub Desktop.
from typing import List
from app.domain.model import Location
from app.domain.use_cases import base_location_use_case
class ListLocationUseCase(base_location_use_case.BaseLocationUseCase):
def list(self) -> List[Location]:
locations = self.repository.list()
locations.sort(key=lambda l: l.date)
return locations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment