Skip to content

Commit 79dd892

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

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

pandas-stubs/core/arrays/integer.pyi

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ from pandas.arrays import (
1313
)
1414

1515
from pandas._libs.missing import NAType
16-
from pandas._typing import (
17-
Dtype,
18-
npt,
19-
)
16+
from pandas._typing import npt
2017

2118
from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype
2219

pandas-stubs/core/arrays/string_.pyi

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
from typing import Sequence
2-
31
import numpy as np
42
import pandas as pd
53
from pandas.core.arrays import PandasArray
64

75
from pandas._typing import (
8-
AnyArrayLike,
6+
npt,
97
type_t,
108
)
119

@@ -23,8 +21,9 @@ class StringDtype(ExtensionDtype):
2321
class StringArray(PandasArray):
2422
def __init__(
2523
self,
26-
# Also pd.NA and np.nan but not possible it seems
27-
values: AnyArrayLike | Sequence[str | None],
24+
values: npt.NDArray[np.str_]
25+
| npt.NDArray[np.string_]
26+
| npt.NDArray[np.object_],
2827
copy: bool = ...,
2928
) -> None: ...
3029
def __arrow_array__(self, type=...): ...

0 commit comments

Comments
 (0)