From 8a47ec1591886c65560ceea37aad16ffbe0d7c20 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Wed, 24 May 2023 09:43:45 -0700 Subject: [PATCH] FIX: Ignore typing and numba warnings in 2.0.x --- doc/source/user_guide/window.rst | 2 ++ doc/source/whatsnew/v2.0.2.rst | 1 + pandas/core/_numba/kernels/mean_.py | 4 ++-- pandas/core/_numba/kernels/sum_.py | 4 ++-- pandas/core/_numba/kernels/var_.py | 4 ++-- pandas/core/groupby/groupby.py | 4 ++-- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/source/user_guide/window.rst b/doc/source/user_guide/window.rst index e08fa81c5fa09..4e7733e25fa88 100644 --- a/doc/source/user_guide/window.rst +++ b/doc/source/user_guide/window.rst @@ -89,6 +89,7 @@ For example, a `weighted mean = min_periods and nobs > 0: diff --git a/pandas/core/_numba/kernels/sum_.py b/pandas/core/_numba/kernels/sum_.py index 056897189fe67..eb8846b1fa50a 100644 --- a/pandas/core/_numba/kernels/sum_.py +++ b/pandas/core/_numba/kernels/sum_.py @@ -92,7 +92,7 @@ def sliding_sum( sum_x, compensation_add, num_consecutive_same_value, - prev_value, + prev_value, # pyright: ignore[reportGeneralTypeIssues] ) else: for j in range(start[i - 1], s): @@ -115,7 +115,7 @@ def sliding_sum( sum_x, compensation_add, num_consecutive_same_value, - prev_value, + prev_value, # pyright: ignore[reportGeneralTypeIssues] ) if nobs == 0 == min_periods: diff --git a/pandas/core/_numba/kernels/var_.py b/pandas/core/_numba/kernels/var_.py index d3243f4928dca..2c4559ddc2121 100644 --- a/pandas/core/_numba/kernels/var_.py +++ b/pandas/core/_numba/kernels/var_.py @@ -110,7 +110,7 @@ def sliding_var( ssqdm_x, compensation_add, num_consecutive_same_value, - prev_value, + prev_value, # pyright: ignore[reportGeneralTypeIssues] ) else: for j in range(start[i - 1], s): @@ -135,7 +135,7 @@ def sliding_var( ssqdm_x, compensation_add, num_consecutive_same_value, - prev_value, + prev_value, # pyright: ignore[reportGeneralTypeIssues] ) if nobs >= min_periods and nobs > ddof: diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index dc7dff74369bb..42b7fd9b635df 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -3074,12 +3074,12 @@ def _nth( # error: No overload variant of "where" matches argument types # "Any", "NAType", "Any" values = np.where(nulls, NA, grouper) # type: ignore[call-overload] - grouper = Index(values, dtype="Int64") + grouper = Index(values, dtype="Int64") # type: ignore[assignment] else: # create a grouper with the original parameters, but on dropped # object - grouper, _, _ = get_grouper( + grouper, _, _ = get_grouper( # type: ignore[assignment] dropped, key=self.keys, axis=self.axis,