Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typing): Add untyped vegafusion to mypy overrides #3640

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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