Skip to content

Commit 99f8a44

Browse files
committed
MAINT: merge main
2 parents 397678c + 48ff241 commit 99f8a44

File tree

10 files changed

+653
-89
lines changed

10 files changed

+653
-89
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: 'Test'
22

33
on:
44
[push, pull_request, workflow_dispatch]
5+
6+
env:
7+
MPLBACKEND: 'Agg'
8+
59
jobs:
610
released:
711
runs-on: ${{ matrix.os }}

pandas-stubs/_typing.pyi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ from typing import (
2020
Optional,
2121
Protocol,
2222
Sequence,
23+
TypedDict,
2324
TypeVar,
2425
Union,
2526
)
@@ -252,4 +253,14 @@ ColspaceArgType = str | int | Sequence[int | str] | Mapping[Hashable, str | int]
252253
# Windowing rank methods
253254
WindowingRankType = Literal["average", "min", "max"]
254255

256+
class StyleExportDict(TypedDict, total=False):
257+
apply: Any
258+
table_attributes: Any
259+
table_styles: Any
260+
hide_index: bool
261+
hide_columns: bool
262+
hide_index_names: bool
263+
hide_column_names: bool
264+
css: dict[str, str | int]
265+
255266
__all__ = ["npt", "type_t"]

pandas-stubs/_version.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ version_json: str = ...
44

55
def get_versions(): ...
66

7-
_stub_version = Literal["1.4.4.220906"]
7+
_stub_version = Literal["1.4.4.220912"]

pandas-stubs/core/indexing.pyi

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
from typing import (
2+
Generic,
3+
TypeVar,
4+
Union,
5+
)
6+
17
import numpy as np
28
from pandas.core.indexes.api import Index
39

@@ -7,8 +13,10 @@ from pandas._typing import (
713
StrLike,
814
)
915

10-
class _IndexSlice:
11-
def __getitem__(self, arg) -> tuple[StrLike | Scalar | slice, ...]: ...
16+
_IndexSliceT = TypeVar("_IndexSliceT", bound=Union[StrLike, Scalar, slice])
17+
18+
class _IndexSlice(Generic[_IndexSliceT]):
19+
def __getitem__(self, arg) -> tuple[_IndexSliceT, ...]: ...
1220

1321
IndexSlice: _IndexSlice
1422

0 commit comments

Comments
 (0)