Skip to content

Commit

Permalink
Refactor TypeBounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Conengmo committed Jan 1, 2023
1 parent 79e0e7c commit fa7e3c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion folium/folium.py
Expand Up @@ -14,6 +14,7 @@
from folium.map import FitBounds, Layer
from folium.raster_layers import TileLayer
from folium.utilities import (
TypeBounds,
TypeJsonValue,
_parse_size,
parse_options,
Expand Down Expand Up @@ -419,7 +420,7 @@ def show_in_browser(self) -> None:

def fit_bounds(
self,
bounds: Sequence[Sequence[float]],
bounds: TypeBounds,
padding_top_left: Optional[Sequence[float]] = None,
padding_bottom_right: Optional[Sequence[float]] = None,
padding: Optional[Sequence[float]] = None,
Expand Down
3 changes: 2 additions & 1 deletion folium/map.py
Expand Up @@ -10,6 +10,7 @@
from jinja2 import Template

from folium.utilities import (
TypeBounds,
TypeJsonValue,
camelize,
escape_backticks,
Expand Down Expand Up @@ -592,7 +593,7 @@ class FitBounds(MacroElement):

def __init__(
self,
bounds: Sequence[Sequence[float]],
bounds: TypeBounds,
padding_top_left: Optional[Sequence[float]] = None,
padding_bottom_right: Optional[Sequence[float]] = None,
padding: Optional[Sequence[float]] = None,
Expand Down
2 changes: 2 additions & 0 deletions folium/utilities.py
Expand Up @@ -50,6 +50,8 @@

TypePathOptions = Union[bool, str, float, None]

TypeBounds = Sequence[Sequence[float]]


_VALID_URLS = set(uses_relative + uses_netloc + uses_params)
_VALID_URLS.discard("")
Expand Down

0 comments on commit fa7e3c9

Please sign in to comment.