Skip to content

Commit ab21369

Browse files
committed
updated pyi for name_filter
1 parent ce5e117 commit ab21369

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

src/__init__.pyi

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ _T = tp.TypeVar('_T')
66

77
__version__: str
88

9+
TLabel = tp.Union[
10+
tp.Hashable,
11+
int,
12+
bool,
13+
np.bool_,
14+
np.integer,
15+
float,
16+
complex,
17+
np.inexact,
18+
str,
19+
bytes,
20+
None,
21+
np.datetime64,
22+
np.timedelta64,
23+
datetime.date,
24+
datetime.datetime,
25+
tp.Tuple['TLabel'],
26+
]
27+
928
class ErrorInitTypeBlocks(RuntimeError):
1029
def __init__(self, *args: tp.Any, **kwargs: tp.Any) -> None: ...
1130
def with_traceback(self, tb: Exception) -> Exception: ...
@@ -103,7 +122,7 @@ def count_iteration(__iterable: tp.Iterable) -> int: ...
103122

104123
def immutable_filter(__array: np.ndarray) -> np.ndarray: ...
105124
def mloc(__array: np.ndarray) -> int: ...
106-
def name_filter(__name: tp.Hashable) -> tp.Hashable: ...
125+
def name_filter(__name: TLabel) -> TLabel: ...
107126
def shape_filter(__array: np.ndarray) -> np.ndarray: ...
108127
def column_2d_filter(__array: np.ndarray) -> np.ndarray: ...
109128
def column_1d_filter(__array: np.ndarray) -> np.ndarray: ...
@@ -112,7 +131,7 @@ def array_deepcopy(__array: np.ndarray, memo: tp.Dict[int, tp.Any]) -> np.ndarra
112131
def resolve_dtype(__d1: np.dtype, __d2: np.dtype) -> np.dtype: ...
113132
def resolve_dtype_iter(__dtypes: tp.Iterable[np.dtype]) -> np.dtype: ...
114133
def isna_element(__value: tp.Any, include_none: bool = True) -> bool: ...
115-
def dtype_from_element(__value: tp.Optional[tp.Hashable]) -> np.dtype: ...
134+
def dtype_from_element(__value: tp.Optional[TLabel]) -> np.dtype: ...
116135
def get_new_indexers_and_screen(indexers: np.ndarray, positions: np.ndarray) -> tp.Tuple[np.ndarray, np.ndarray]: ...
117136

118137
def first_true_1d(__array: np.ndarray, *, forward: bool) -> int: ...

0 commit comments

Comments
 (0)