Skip to content

Commit 004ebca

Browse files
committed
fix circular import
1 parent bab2586 commit 004ebca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

folium/utilities.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import uuid
1010
from contextlib import contextmanager
1111
from typing import (
12+
TYPE_CHECKING,
1213
Any,
1314
Callable,
1415
Dict,
@@ -35,13 +36,14 @@
3536
write_png,
3637
)
3738

38-
from folium import Popup
39-
4039
try:
4140
import pandas as pd
4241
except ImportError:
4342
pd = None
4443

44+
if TYPE_CHECKING:
45+
from .features import Popup
46+
4547

4648
TypeLine = Iterable[Sequence[float]]
4749
TypeMultiLine = Union[TypeLine, Iterable[TypeLine]]
@@ -54,7 +56,7 @@
5456
TypeBounds = Sequence[Sequence[float]]
5557
TypeBoundsReturn = List[List[Optional[float]]]
5658

57-
TypeContainer = Union[Figure, Div, Popup]
59+
TypeContainer = Union[Figure, Div, "Popup"]
5860

5961

6062
_VALID_URLS = set(uses_relative + uses_netloc + uses_params)

0 commit comments

Comments
 (0)