Skip to content

Commit 08c83e9

Browse files
committed
Fix mypy typing error
1 parent aa83319 commit 08c83e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/reshape/merge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ def __init__(
10341034

10351035
def _validate_how(
10361036
self, how: JoinHow | Literal["left_anti", "right_anti", "asof"]
1037-
) -> tuple[JoinHow, bool]:
1037+
) -> tuple[JoinHow | Literal["asof"], bool]:
10381038
"""
10391039
Validate the 'how' parameter and return the actual join type and whether
10401040
this is an anti join.
@@ -1059,6 +1059,7 @@ def _validate_how(
10591059
if how in {"left_anti", "right_anti"}:
10601060
how = how.split("_")[0] # type: ignore[assignment]
10611061
anti_join = True
1062+
how = cast(JoinHow | Literal["asof"], how)
10621063
return how, anti_join
10631064

10641065
def _maybe_require_matching_dtypes(

0 commit comments

Comments
 (0)