Skip to content

Commit 05eb2ce

Browse files
committed
changed typecheck import
1 parent f32736e commit 05eb2ce

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/spatialdata_plot/pl/render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
def _coerce_categorical_source(cat_source: Any) -> pd.Categorical:
6969
"""Return a pandas Categorical from known, concrete sources only."""
7070
if isinstance(cat_source, dd.Series):
71-
if dd.api.types.is_categorical_dtype(cat_source.dtype) and getattr(cat_source.cat, "known", True) is False:
71+
if pd.api.types.is_categorical_dtype(cat_source.dtype) and getattr(cat_source.cat, "known", True) is False:
7272
cat_source = cat_source.cat.as_known()
7373
cat_source = cat_source.compute()
7474

tests/pl/test_render_shapes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,13 +802,13 @@ def test_plot_can_annotate_shapes_with_nan_in_table_obs_categorical_datashader(
802802
def test_plot_can_annotate_shapes_with_nan_in_table_obs_continuous(
803803
self, sdata_blobs_shapes_with_nans_in_table: SpatialData
804804
):
805-
sdata_blobs_shapes_with_nans_in_table.pl.render_shapes("blobs_polygons", color="cola").pl.show()
805+
sdata_blobs_shapes_with_nans_in_table.pl.render_shapes("blobs_polygons", color="col_a").pl.show()
806806

807807
def test_plot_can_annotate_shapes_with_nan_in_table_obs_continuous_datashader(
808808
self, sdata_blobs_shapes_with_nans_in_table: SpatialData
809809
):
810810
sdata_blobs_shapes_with_nans_in_table.pl.render_shapes(
811-
"blobs_polygons", color="cola", method="datashader"
811+
"blobs_polygons", color="col_a", method="datashader"
812812
).pl.show()
813813

814814
def test_plot_can_annotate_shapes_with_nan_in_table_X_continuous(

0 commit comments

Comments
 (0)