Skip to content

Commit 3cdd854

Browse files
committed
Refactor prepare_ts_data to improve type annotations.
Added precise type annotations to the function signature for better clarity and type checking. Replaced `data` with `series` and `kwds` with `kwargs` to enhance readability and consistency.
1 parent a4de7f8 commit 3cdd854

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/plotting/_matplotlib/timeseries.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,10 @@ def format_dateaxis(
366366
plt.draw_if_interactive()
367367

368368

369-
def prepare_ts_data(data, ax, kwds):
370-
freq, data = maybe_resample(data, ax, kwds)
369+
def prepare_ts_data(
370+
series: Series, ax: Axes, kwargs: dict[str, Any]
371+
) -> tuple[BaseOffset | str, Series]:
372+
freq, data = maybe_resample(series, ax, kwargs)
371373

372374
# Set ax with freq info
373375
decorate_axes(ax, freq)

0 commit comments

Comments
 (0)