Skip to content

Commit

Permalink
fix(typing): Add untyped vegafusion to mypy overrides (#3640)
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned authored Oct 13, 2024
1 parent 2032036 commit bb46f81
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion altair/utils/_importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def import_vegafusion() -> ModuleType:
min_version = "1.5.0"
try:
import vegafusion as vf # type: ignore
import vegafusion as vf

version = importlib_version("vegafusion")
embed_version = importlib_version("vegafusion-python-embed")
Expand Down
2 changes: 1 addition & 1 deletion altair/utils/_vegafusion_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
if TYPE_CHECKING:
from narwhals.typing import IntoDataFrame

from vegafusion.runtime import ChartState # type: ignore
from vegafusion.runtime import ChartState

# Temporary storage for dataframes that have been extracted
# from charts by the vegafusion data transformer. Use a WeakValueDictionary
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ module = [
"nbformat.*",
"ipykernel.*",
"ibis.*",
"vegafusion.*",
# This refers to schemapi in the tools folder which is imported
# by the tools scripts such as generate_schema_wrapper.py
# "schemapi.*"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_jupyter_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


try:
import vegafusion # type: ignore # noqa: F401
import vegafusion # noqa: F401

transformers = ["default", "vegafusion"]
except ImportError:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_transformed_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import narwhals as nw

try:
import vegafusion as vf # type: ignore
import vegafusion as vf
except ImportError:
vf = None

Expand Down

0 comments on commit bb46f81

Please sign in to comment.