MCPcopy Index your code
hub / github.com/python-visualization/folium / _validate_locations_basics

Function _validate_locations_basics

folium/utilities.py:114–126  ·  view source on GitHub ↗

Helper function that does basic validation of line and multi-line types.

(locations: TypeMultiLine)

Source from the content-addressed store, hash-verified

112
113
114def _validate_locations_basics(locations: TypeMultiLine) -> None:
115 """Helper function that does basic validation of line and multi-line types."""
116 try:
117 iter(locations)
118 except TypeError:
119 raise TypeError(
120 "Locations should be an iterable with coordinate pairs,"
121 f" but instead got {locations!r}."
122 )
123 try:
124 next(iter(locations))
125 except StopIteration:
126 raise ValueError("Locations is empty.")
127
128
129def validate_locations(locations: TypeLine) -> List[List[float]]:

Callers 2

validate_locationsFunction · 0.85
validate_multi_locationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected