Skip to content

Commit acf44e2

Browse files
committed
ruff
1 parent c5bde83 commit acf44e2

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

tests/test_common.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ def test_allow_unassigned(self) -> None:
7373
"""Test allowing unassigned dimensions with more dims than slots."""
7474
# box has 5 slots, but we have 6 dims - allow_unassigned lets this work
7575
slots = assign_slots(list("abcdef"), "box", allow_unassigned=True)
76-
assert slots == {"x": "a", "color": "b", "facet_col": "c", "facet_row": "d", "animation_frame": "e"}
76+
assert slots == {
77+
"x": "a",
78+
"color": "b",
79+
"facet_col": "c",
80+
"facet_row": "d",
81+
"animation_frame": "e",
82+
}
7783
# 'f' is unassigned but no error is raised
7884

7985

xarray_plotly/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
from xarray_plotly.common import SLOT_ORDERS, auto
3232

3333
__all__ = [
34-
"DataArrayPlotlyAccessor",
3534
"SLOT_ORDERS",
35+
"DataArrayPlotlyAccessor",
3636
"auto",
3737
]
3838

xarray_plotly/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from __future__ import annotations
99

10-
from typing import TYPE_CHECKING, Any
10+
from typing import TYPE_CHECKING
1111

1212
if TYPE_CHECKING:
1313
from collections.abc import Hashable, Sequence
@@ -167,7 +167,6 @@ def get_value_col(darray: DataArray) -> str:
167167

168168
def to_dataframe(darray: DataArray) -> pd.DataFrame:
169169
"""Convert a DataArray to a long-form DataFrame for Plotly Express."""
170-
import pandas as pd
171170

172171
if darray.name is None:
173172
darray = darray.rename("value")

0 commit comments

Comments
 (0)