Skip to content

Commit 1e5c9ed

Browse files
committed
BUG: Correct StringArray init
1 parent d1d7675 commit 1e5c9ed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas-stubs/core/arrays/string_.pyi

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import pandas as pd
55
from pandas.core.arrays import PandasArray
66

77
from pandas._typing import (
8-
AnyArrayLike,
8+
npt,
99
type_t,
1010
)
1111

@@ -23,8 +23,9 @@ class StringDtype(ExtensionDtype):
2323
class StringArray(PandasArray):
2424
def __init__(
2525
self,
26-
# Also pd.NA and np.nan but not possible it seems
27-
values: AnyArrayLike | Sequence[str | None],
26+
values: npt.NDArray[np.str_]
27+
| npt.NDArray[np.string_]
28+
| npt.NDArray[np.object_],
2829
copy: bool = ...,
2930
) -> None: ...
3031
def __arrow_array__(self, type=...): ...

0 commit comments

Comments
 (0)