mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
navd: add repr method to Coordinate (#28959)
* repr coordinate for debugging * fix * stash * better formatting
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user