Skip to content

Commit bf98500

Browse files
committed
Fix type hint for double_axes_echem_plot to accept single DataFrame
1 parent e7ea330 commit bf98500

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pydatalab/src/pydatalab/bokeh_plots.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def selectable_axes_plot(
499499

500500

501501
def double_axes_echem_plot(
502-
dfs: list[pd.DataFrame],
502+
dfs: pd.DataFrame | list[pd.DataFrame],
503503
mode: str | None = None,
504504
cycle_summary_dfs: list[pd.DataFrame] | None = None,
505505
x_options: Sequence[str] = [],
@@ -511,8 +511,9 @@ def double_axes_echem_plot(
511511
"""Creates a Bokeh plot for electrochemistry data.
512512
513513
Args:
514-
dfs: List of pre-processed DataFrames, each containing capacities and
515-
voltages, indexed by half cycle.
514+
dfs: A single DataFrame or list of pre-processed DataFrames, each containing
515+
capacities and voltages, indexed by half cycle. Single DataFrames are
516+
automatically converted to a list for backward compatibility.
516517
mode: Either "dQ/dV", "dV/dQ", "normal" or None.
517518
cycle_summary_dfs: Optional list of dataframes containing
518519
cycle summary information, to plot final capacities.

0 commit comments

Comments
 (0)