From 6ecbab99c37bcb83310eaaa04c24e9c54c45fbf5 Mon Sep 17 00:00:00 2001 From: Ali Hamdan Date: Sun, 26 May 2024 18:07:08 +0200 Subject: [PATCH] Fix CI from PR 930 --- pandas-stubs/core/groupby/generic.pyi | 2 +- tests/test_plotting.py | 31 ++++++++++++++------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/pandas-stubs/core/groupby/generic.pyi b/pandas-stubs/core/groupby/generic.pyi index 37f3c0dc..65522a9b 100644 --- a/pandas-stubs/core/groupby/generic.pyi +++ b/pandas-stubs/core/groupby/generic.pyi @@ -207,7 +207,7 @@ class DataFrameGroupBy(GroupBy[DataFrame], Generic[ByT]): ) -> DataFrame: ... # error: overload 1 overlaps overload 2 because of different return types @overload - def aggregate(self, func: Literal["size"]) -> Series: ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload] + def aggregate(self, func: Literal["size"]) -> Series: ... # type: ignore[overload-overlap] @overload def aggregate( self, diff --git a/tests/test_plotting.py b/tests/test_plotting.py index e6ebcec2..b541c443 100644 --- a/tests/test_plotting.py +++ b/tests/test_plotting.py @@ -486,22 +486,23 @@ def test_plot_scatter(close_figures) -> None: ), Axes, ) - check( - assert_type( - IRIS_DF.plot.scatter(x="SepalLength", y="SepalWidth", subplots=True), - npt.NDArray[np.object_], - ), - np.ndarray, - ) - check( - assert_type( - IRIS_DF.plot( - x="SepalLength", y="SepalWidth", subplots=True, kind="scatter" + with pytest.warns(UserWarning): + check( + assert_type( + IRIS_DF.plot.scatter(x="SepalLength", y="SepalWidth", subplots=True), + npt.NDArray[np.object_], ), - npt.NDArray[np.object_], - ), - np.ndarray, - ) + np.ndarray, + ) + check( + assert_type( + IRIS_DF.plot( + x="SepalLength", y="SepalWidth", subplots=True, kind="scatter" + ), + npt.NDArray[np.object_], + ), + np.ndarray, + ) def test_plot_keywords(close_figures):