diff --git a/altair/vegalite/v5/display.py b/altair/vegalite/v5/display.py index aead52a4d..eef632e02 100644 --- a/altair/vegalite/v5/display.py +++ b/altair/vegalite/v5/display.py @@ -100,7 +100,7 @@ def jupyter_renderer(spec: dict, **metadata): JupyterChart.enable_offline(offline=offline) # type: ignore[attr-defined] # propagate embed options - embed_options = metadata.get("embed_options", None) + embed_options = metadata.get("embed_options") # Need to ignore attr-defined mypy rule because mypy doesn't see _repr_mimebundle_ # conditionally defined in AnyWidget diff --git a/tests/utils/test_to_values_narwhals.py b/tests/utils/test_to_values_narwhals.py index b1be4c571..2e51979ba 100644 --- a/tests/utils/test_to_values_narwhals.py +++ b/tests/utils/test_to_values_narwhals.py @@ -1,11 +1,11 @@ -import re -import sys from datetime import datetime import narwhals.stable.v1 as nw import pandas as pd import pytest +from tests import skip_requires_pyarrow + try: import pyarrow as pa except ImportError: diff --git a/tests/utils/test_utils.py b/tests/utils/test_utils.py index 511b79699..e89876ee4 100644 --- a/tests/utils/test_utils.py +++ b/tests/utils/test_utils.py @@ -1,6 +1,5 @@ import io import json -import sys import warnings import narwhals.stable.v1 as nw @@ -13,6 +12,7 @@ sanitize_narwhals_dataframe, sanitize_pandas_dataframe, ) +from tests import skip_requires_pyarrow try: import pyarrow as pa diff --git a/tests/vegalite/v5/test_api.py b/tests/vegalite/v5/test_api.py index 9fa767cf4..119f4845c 100644 --- a/tests/vegalite/v5/test_api.py +++ b/tests/vegalite/v5/test_api.py @@ -10,8 +10,9 @@ import re import sys import tempfile -from datetime import date +from datetime import date, datetime from importlib.metadata import version as importlib_version +from typing import Any import duckdb import jsonschema @@ -24,15 +25,13 @@ import altair as alt from altair.utils.core import use_signature from altair.utils.schemapi import Optional, SchemaValidationError, Undefined -from tests import skip_requires_pyarrow, skip_requires_vl_convert, slow +from tests import skip_requires_pyarrow try: import vl_convert as vlc except ImportError: vlc = None -ibis.set_backend("polars") - PANDAS_VERSION = Version(importlib_version("pandas")) @@ -529,8 +528,6 @@ def test_when_labels_position_based_on_condition() -> None: import numpy as np import pandas as pd - from altair.utils.schemapi import SchemaValidationError - rand = np.random.RandomState(42) df = pd.DataFrame({"xval": range(100), "yval": rand.randn(100).cumsum()})