Pandas locindexer for dataframes inspected as unknown
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
For series this is correctly inferred:
But for dataframes it's simply `Unknown`:
Shouldn't the second signature match `Callable`, second from the bottom in this signature?
```python
class _LocIndexerFrame(_LocIndexer, Generic[_T]):
@overload
def __getitem__(self, idx: Scalar) -> Series | _T: ...
@overload
def __getitem__( # type: ignore[overload-overlap]
self,
idx: (
IndexType
| MaskType
| Callable[[DataFrame], IndexType | MaskType | Sequence[Hashable]]
| list[HashableT]
| tuple[
IndexType
| MaskType
| list[HashableT]
| slice
| _IndexSliceTuple
| Callable,
MaskType | list[HashableT] | IndexType | Callable,
]
),
) -> _T: ...
...
```
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.