From a6a6dbf142d85b1619cfd4f5980c57c83c42b8b1 Mon Sep 17 00:00:00 2001 From: Ofsouzap Date: Sat, 9 Nov 2024 19:18:37 +0000 Subject: [PATCH 1/2] Correct typing fix --- pandas/core/generic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index d77f973f124b1..d8c48b62dd0fb 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -8024,7 +8024,8 @@ def asof(self, where, subset=None): np.nan, index=self.columns, name=where[0] ) - locs = self.index.asof_locs(where, ~cast("DataFrame", nulls._values)) + # error: Unsupported operand type for ~ ("ExtensionArray | ndarray[Any, Any] | Any") + locs = self.index.asof_locs(where, ~nulls._values) # type: ignore[operator] # mask the missing mask = locs == -1 From 4f838b60ad9f117ca6a25fa73d41c6417d93f6b5 Mon Sep 17 00:00:00 2001 From: Ofsouzap Date: Sat, 9 Nov 2024 19:33:50 +0000 Subject: [PATCH 2/2] Formatting fixes --- pandas/core/generic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index d8c48b62dd0fb..7c2cc5d33a5db 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -8024,7 +8024,8 @@ def asof(self, where, subset=None): np.nan, index=self.columns, name=where[0] ) - # error: Unsupported operand type for ~ ("ExtensionArray | ndarray[Any, Any] | Any") + # error: Unsupported operand type for + # ~ ("ExtensionArray | ndarray[Any, Any] | Any") locs = self.index.asof_locs(where, ~nulls._values) # type: ignore[operator] # mask the missing