navd: add repr method to Coordinate (#28959)

* repr coordinate for debugging

* fix

* stash

* better formatting
This commit is contained in:
Shane Smiskol
2023-07-14 21:42:01 -07:00
committed by GitHub
parent f495c21805
commit cbde480cb9
+4 -1
View File
@@ -29,7 +29,10 @@ class Coordinate:
return {'latitude': self.latitude, 'longitude': self.longitude}
def __str__(self) -> str:
return f"({self.latitude}, {self.longitude})"
return f'Coordinate({self.latitude}, {self.longitude})'
def __repr__(self) -> str:
return self.__str__()
def __eq__(self, other) -> bool:
if not isinstance(other, Coordinate):