Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ cmake_install.cmake
CMakeCache.txt
main
Makefile
libreverse_geocode.a
libreverse_geocode.a

# IDE related files #
#####################
.idea
4 changes: 2 additions & 2 deletions reverse_geocoder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ def get(geo_coord, mode=2, verbose=True):
"""
Function to query for a single coordinate
"""
if not isinstance(geo_coord, tuple) or not isinstance(geo_coord[0], float):
raise TypeError('Expecting a tuple')
if not isinstance(geo_coord, tuple) or not all(isinstance(c, (float, int)) for c in geo_coord):
raise TypeError('Expecting a tuple of floats or ints')

_rg = RGeocoder(mode=mode, verbose=verbose)
return _rg.query([geo_coord])[0]
Expand Down