Skip to content

Commit 2190f91

Browse files
committed
added type ignore in _get_common_dtype in dtypes.py
1 parent 3c75b7f commit 2190f91

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/core/dtypes/dtypes.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2130,9 +2130,11 @@ def _get_common_dtype(self, dtypes: list[DtypeObj]) -> DtypeObj | None:
21302130
PerformanceWarning,
21312131
stacklevel=find_stack_level(),
21322132
)
2133-
21342133
np_dtypes = (x.subtype if isinstance(x, SparseDtype) else x for x in dtypes)
2135-
return SparseDtype(np_find_common_type(*np_dtypes), fill_value=fill_value)
2134+
# error: Argument 1 to "np_find_common_type" has incompatible type
2135+
# "*Generator[Any | dtype[Any] | ExtensionDtype, None, None]";
2136+
# expected "dtype[Any]" [arg-type]
2137+
return SparseDtype(np_find_common_type(*np_dtypes), fill_value=fill_value) # type: ignore [arg-type]
21362138

21372139

21382140
@register_extension_dtype

0 commit comments

Comments
 (0)