Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Jan 7, 2025
1 parent 214d239 commit a2cb75f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion holoviews/element/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
if TYPE_CHECKING:
from typing import TypeVar

Array = TypeVar('Array', np.ndarray, pd.api.extensions.ExtensionArray)
Array = TypeVar("Array", np.ndarray, pd.api.extensions.ExtensionArray)


def split_path(path):
Expand Down
13 changes: 8 additions & 5 deletions holoviews/tests/plotting/bokeh/test_barplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,10 @@ def test_bars_not_continuous_data_list_custom_width(self):
assert plot.handles["glyph"].width == 1

def test_bars_categorical_order(self):
cells_dtype = pd.CategoricalDtype(pd.array(["~1M", "~10M", "~100M"], dtype="string"), ordered=True)
cells_dtype = pd.CategoricalDtype(
pd.array(["~1M", "~10M", "~100M"], dtype="string"),
ordered=True,
)
df = pd.DataFrame(dict(
cells=cells_dtype.categories.astype(cells_dtype),
time=pd.array([2.99, 18.5, 835.2]),
Expand All @@ -361,12 +364,12 @@ def test_bars_categorical_order(self):

bars = Bars(df, ["function", "cells"], ["time"])
plot = bokeh_renderer.get_plot(bars)
x_factors = plot.handles['x_range'].factors
x_factors = plot.handles["x_range"].factors

np.testing.assert_equal(x_factors, [
('read', np.str_('~1M')),
('read', np.str_('~10M')),
('read', np.str_('~100M')),
("read", "~1M"),
("read", "~10M"),
("read", "~100M"),
])

def test_bars_group(self):
Expand Down

0 comments on commit a2cb75f

Please sign in to comment.