Skip to content

Commit 92abc90

Browse files
committed
mapping
1 parent 3cd3d9e commit 92abc90

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

pandas-stubs/_testing/__init__.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def assert_almost_equal(
4040
atol: float = 1e-8,
4141
**kwargs: Any,
4242
) -> None: ...
43-
def assert_dict_equal(left: dict, right: dict, compare_keys: bool = True) -> None: ...
4443
def assert_index_equal(
4544
left: Index,
4645
right: Index,

pandas-stubs/core/computation/eval.pyi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from collections.abc import Mapping
1+
from collections.abc import (
2+
Hashable,
3+
Mapping,
4+
MutableSequence,
5+
)
26
from typing import (
37
Any,
48
Literal,
@@ -21,7 +25,7 @@ def eval(
2125
engine: Literal["python", "numexpr"] | None = ...,
2226
local_dict: dict[str, Any] | None = None,
2327
global_dict: dict[str, Any] | None = None,
24-
resolvers: list[Mapping] | None = ...,
28+
resolvers: MutableSequence[Mapping[Hashable, Any]] | None = ...,
2529
level: int = 0,
2630
target: object | None = None,
2731
inplace: bool = False,

pandas-stubs/core/frame.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ from collections.abc import (
1313
Iterator,
1414
Mapping,
1515
MutableMapping,
16+
MutableSequence,
1617
Sequence,
1718
)
1819
import datetime as dt
@@ -550,7 +551,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
550551
self,
551552
orient: Literal["split", "tight"],
552553
*,
553-
into: MutableMapping | type[MutableMapping],
554+
into: MutableMapping[Hashable, Any] | type[MutableMapping],
554555
index: bool = ...,
555556
) -> MutableMapping[str, list[Any]]: ...
556557
@overload
@@ -907,7 +908,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
907908
engine: Literal["python", "numexpr"] | None = ...,
908909
local_dict: dict[_str, Any] | None = ...,
909910
global_dict: dict[_str, Any] | None = ...,
910-
resolvers: list[Mapping] | None = ...,
911+
resolvers: MutableSequence[Mapping[Hashable, Any]] | None = ...,
911912
level: int = ...,
912913
target: object | None = ...,
913914
inplace: Literal[True],
@@ -922,7 +923,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
922923
engine: Literal["python", "numexpr"] | None = ...,
923924
local_dict: dict[_str, Any] | None = ...,
924925
global_dict: dict[_str, Any] | None = ...,
925-
resolvers: list[Mapping] | None = ...,
926+
resolvers: MutableSequence[Mapping[Hashable, Any]] | None = ...,
926927
level: int = ...,
927928
target: object | None = ...,
928929
) -> Self: ...

pandas-stubs/core/series.pyi

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,13 @@ class Series(IndexOpsMixin[S1], ElementOpsMixin[S1], NDFrame):
11701170
def apply(
11711171
self,
11721172
func: Callable[
1173-
..., Scalar | Sequence[Any] | AbstractSet[Any] | Mapping | NAType | None
1173+
...,
1174+
Scalar
1175+
| Sequence[Any]
1176+
| AbstractSet[Any]
1177+
| Mapping[Hashable, Any]
1178+
| NAType
1179+
| None,
11741180
],
11751181
convertDType: _bool = ...,
11761182
args: tuple[Any, ...] = ...,

pandas-stubs/io/clipboards.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from collections import defaultdict
22
from collections.abc import (
33
Callable,
4+
Hashable,
45
Sequence,
56
)
67
import csv

0 commit comments

Comments
 (0)