Skip to content

Commit

Permalink
import vegafusion before version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Oct 12, 2024
1 parent 4fae723 commit 1b4e918
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion altair/utils/_importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
def import_vegafusion() -> ModuleType:
min_version = "1.5.0"
try:
import vegafusion as vf # type: ignore

version = importlib_version("vegafusion")
embed_version = importlib_version("vegafusion-python-embed")
if version != embed_version or Version(version) < Version(min_version):
Expand All @@ -23,7 +25,6 @@ def import_vegafusion() -> ModuleType:
f" - vegafusion-python-embed=={embed_version}\n"
)
raise RuntimeError(msg)
import vegafusion as vf # type: ignore

return vf
except ImportError as err:
Expand Down

0 comments on commit 1b4e918

Please sign in to comment.