Open
Description
Pandas version checks
- I have checked that the issue still exists on the latest versions of the docs on
main
here
Location of the documentation
The docs currently say this for the tuples
parameter:
list / sequence of tuple-likes
Documentation problem
Pandas-stubs annotates the parameter as sequence: https://github.com/pandas-dev/pandas-stubs/blob/main/pandas-stubs/core/indexes/multi.pyi#L49
Pandas source code annotates the parameter as iterable: https://github.com/pandas-dev/pandas/blob/main/pandas/core/indexes/multi.py#L521
Typing the parameter as sequence prevents this pattern from typechecking, even if it works at runtime:
MultiIndex.from_tuples(zip(['a'], ['b']))
This was raised in pandas-dev/pandas-stubs#1158
Suggested fix for documentation
Could we loosen the type annotation in the docs to say iterable? Then I can update pandas-stubs to match.