import pandas as pd
df = pd.DataFrame()
rows: list[pd.DataFrame] = [pd.DataFrame()]
# Fails
pd.concat([df, *rows], axis="index", ignore_index=True)
# Passes
tmp: list[pd.DataFrame] = [df, *rows]
pd.concat(tmp, axis="index", ignore_index=True)
ERROR No matching overload found for function `pandas.core.reshape.concat.concat` called with arguments: (list[DataFrame], axis=Literal['index'], ignore_index=Literal[True]) [no-matching-overload]
Possible overloads:
(objs: Iterable[None] | Mapping[HashableT1, None], *, axis: Axis = 0, ..., ignore_index: bool = False, ...) -> Never [closest match]
(objs: Iterable[NDFrame | None] | Mapping[HashableT1, NDFrame | None], *, axis: Axis = 0, ..., ignore_index: Literal[True], ...) -> Never
(objs: Iterable[Series[S2] | None] | Mapping[HashableT1, Series[S2] | None], *, axis: AxisIndex = 0, ..., ignore_index: bool = False, ...) -> Series[S2]
(objs: Iterable[Series | None] | Mapping[HashableT1, Series | None], *, axis: AxisIndex = 0, ..., ignore_index: bool = False, ...) -> Series
(objs: Iterable[Series | None] | Mapping[HashableT1, Series | None], *, axis: AxisColumn, ..., ignore_index: bool = False, ...) -> DataFrame
(objs: Iterable[DataFrameT0 | None] | Mapping[HashableT1, DataFrameT0 | None], *, axis: Axis = 0, ..., ignore_index: bool = False, ...) -> DataFrameT0
(objs: Iterable[NDFrame | None] | Mapping[HashableT1, NDFrame | None], *, axis: Axis = 0, ..., ignore_index: Literal[False] = False, ...) -> DataFrame
Argument `list[DataFrame]` is not assignable to parameter `objs` with type `Iterable[None] | Mapping[@_, None]` in function `pandas.core.reshape.concat.concat`
ERROR sandbox.py:1:8-20: Stubs for `pandas` are bundled with Pyrefly but the source files for the package are not found. [[missing-source-for-stubs](https://pyrefly.org/en/docs/error-kinds/#missing-source-for-stubs)]
Describe the Bug
MWN:
The version that now fails used to work in
1.1.1but now fails with something likeSandbox fails with
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response