diff --git a/pandas/_testing/asserters.py b/pandas/_testing/asserters.py index 90ee600c1967d..7c89946a0c12f 100644 --- a/pandas/_testing/asserters.py +++ b/pandas/_testing/asserters.py @@ -864,7 +864,7 @@ def assert_series_equal( check_dtype: bool | Literal["equiv"] = True, check_index_type="equiv", check_series_type=True, - check_less_precise=no_default, + check_less_precise: bool | int | NoDefault = no_default, check_names=True, check_exact=False, check_datetimelike_compat=False, diff --git a/pandas/core/generic.py b/pandas/core/generic.py index f896169d0ae44..ef7e8421a0cdd 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -1050,7 +1050,9 @@ def _rename( return result.__finalize__(self, method="rename") @rewrite_axis_style_signature("mapper", [("copy", True), ("inplace", False)]) - def rename_axis(self, mapper=lib.no_default, **kwargs): + def rename_axis( + self, mapper: IndexLabel | lib.NoDefault = lib.no_default, **kwargs + ): """ Set the name of the axis for the index or columns. diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index 4da39318579eb..583612b4659b6 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -578,7 +578,10 @@ def from_tuples( @classmethod def from_product( - cls, iterables, sortorder=None, names=lib.no_default + cls, + iterables: Sequence[Iterable[Hashable]], + sortorder: int | None = None, + names: Sequence[Hashable] | lib.NoDefault = lib.no_default, ) -> MultiIndex: """ Make a MultiIndex from the cartesian product of multiple iterables. diff --git a/pandas/plotting/_matplotlib/groupby.py b/pandas/plotting/_matplotlib/groupby.py index 1b16eefb360ae..4f1cd3f38343a 100644 --- a/pandas/plotting/_matplotlib/groupby.py +++ b/pandas/plotting/_matplotlib/groupby.py @@ -112,7 +112,9 @@ def reconstruct_data_with_by( data_list = [] for key, group in grouped: - columns = MultiIndex.from_product([[key], cols]) + # error: List item 1 has incompatible type "Union[Hashable, + # Sequence[Hashable]]"; expected "Iterable[Hashable]" + columns = MultiIndex.from_product([[key], cols]) # type: ignore[list-item] sub_group = group[cols] sub_group.columns = columns data_list.append(sub_group)