Skip to content

Commit c8e6d8f

Browse files
committed
use Mapping instead of dict as it is invariant
1 parent e40d245 commit c8e6d8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas-stubs/core/strings.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# pyright: strict
22
from collections.abc import (
33
Callable,
4+
Mapping,
45
Sequence,
56
)
67
import re
@@ -166,7 +167,7 @@ class StringMethods(NoNewAttributesMixin, Generic[T, _TS, _TM, _TS2]):
166167
break_on_hyphens: bool | None = ...,
167168
) -> T: ...
168169
def get_dummies(self, sep: str = ...) -> pd.DataFrame: ...
169-
def translate(self, table: dict[int, int | str | None] | None) -> T: ...
170+
def translate(self, table: Mapping[int, int | str | None] | None) -> T: ...
170171
def count(self, pat: str, flags: int = ...) -> Series[int]: ...
171172
def startswith(self, pat: str | tuple[str, ...], na: Any = ...) -> Series[bool]: ...
172173
def endswith(self, pat: str | tuple[str, ...], na: Any = ...) -> Series[bool]: ...

0 commit comments

Comments
 (0)