cleanup in view of docker builds
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import uuid
|
||||
|
||||
from .landmark import Landmark
|
||||
from utils.get_time_separation import get_time
|
||||
|
||||
@@ -45,4 +44,18 @@ class LinkedLandmarks:
|
||||
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"LinkedLandmarks, total time: {self.total_time} minutes, {len(self._landmarks)} stops: [\n\t{'\n\t'.join([str(landmark) for landmark in self._landmarks])}\n]"
|
||||
return f"LinkedLandmarks, total time: {self.total_time} minutes, {len(self._landmarks)} stops: [{','.join([str(landmark) for landmark in self._landmarks])}]"
|
||||
|
||||
|
||||
def asdict(self) -> dict:
|
||||
"""
|
||||
Convert the linked landmarks to a json serializable dictionary.
|
||||
|
||||
Returns:
|
||||
dict: A dictionary representation of the linked landmarks.
|
||||
"""
|
||||
return {
|
||||
'uuid': self.uuid,
|
||||
'total_time': self.total_time,
|
||||
'landmarks': [landmark.dict() for landmark in self._landmarks]
|
||||
}
|
||||
|
Reference in New Issue
Block a user