diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py index 3b0d59501ba05..b355cba6354da 100644 --- a/pandas/plotting/_matplotlib/core.py +++ b/pandas/plotting/_matplotlib/core.py @@ -700,12 +700,8 @@ def _plot(cls, ax: Axes, x, y, style=None, is_errorbar: bool = False, **kwds): kwds["yerr"] = np.array(kwds.get("yerr")) return ax.errorbar(x, y, **kwds) else: - # prevent style kwarg from going to errorbar, where it is - # unsupported - if style is not None: - args = (x, y, style) - else: - args = (x, y) # type: ignore[assignment] + # prevent style kwarg from going to errorbar, where it is unsupported + args = (x, y, style) if style is not None else (x, y) return ax.plot(*args, **kwds) def _get_index_name(self) -> Optional[str]: