Skip to content

Commit

Permalink
Allow comparisons to None on LatLon
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteelz committed Oct 1, 2024
1 parent 054c927 commit d7ed2c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gtfs_loader/lat_lon.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def distance_to_segment(x, l1, l2):
return LatLon.EARTH_RADIUS_M * min(d_l1_x, d_l2_x)

def __eq__(self, other):
if other == None:
return False
return self.lat == other.lat and self.lon == other.lon

def __hash__(self):
Expand Down

0 comments on commit d7ed2c6

Please sign in to comment.