Skip to content

Commit

Permalink
fix: python 3.9 regression from typing
Browse files Browse the repository at this point in the history
  • Loading branch information
coroa committed Oct 23, 2024
1 parent 34f1297 commit 6fbaa99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pandas_indexing/accessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def extract(
regex: bool = False,
axis: Axis = 0,
drop: Optional[bool] = None,
optional: Sequence[str] | None = None,
optional: Optional[Sequence[str]] = None,
**templates: str,
) -> Union[DataFrame, Series, Index]:
if drop is not None:
Expand All @@ -102,7 +102,7 @@ def extract(

@doc(formatlevel, index_or_data="")
def format(
self, axis: Axis = 0, optional: Sequence[str] | None = None, **templates: str
self, axis: Axis = 0, optional: Optional[Sequence[str]] = None, **templates: str
) -> Union[DataFrame, Series, Index]:
return formatlevel(self._obj, axis=axis, optional=optional, **templates)

Expand Down
4 changes: 2 additions & 2 deletions src/pandas_indexing/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def extractlevel(
regex: bool = False,
drop: Optional[bool] = None,
axis: Axis = 0,
optional: Sequence[str] | None = None,
optional: Optional[Sequence[str]] = None,
**templates: str,
) -> T:
"""Extract new index levels with *templates* matched against any index
Expand Down Expand Up @@ -970,7 +970,7 @@ def formatlevel(
index_or_data: T,
drop: bool = False,
axis: Axis = 0,
optional: Sequence[str] | None = None,
optional: Optional[Sequence[str]] = None,
**templates: str,
) -> T:
"""Format index levels based on a *template* which can refer to other
Expand Down

0 comments on commit 6fbaa99

Please sign in to comment.