Skip to content

Commit b67e8e9

Browse files
committed
remove duplicate params and add defaults
1 parent ff4aa15 commit b67e8e9

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

pandas-stubs/_typing.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ from collections.abc import (
88
Sequence,
99
)
1010
import datetime
11-
from datetime import timedelta, tzinfo
11+
from datetime import tzinfo
1212
from os import PathLike
1313
from re import Pattern
1414
import sys
@@ -843,8 +843,6 @@ IntoColumn: TypeAlias = (
843843
)
844844

845845
class PctChangeKwargs(TypedDict, total=False):
846-
periods: int
847-
freq: Frequency | timedelta | None
848846
axis: AxisIndex
849847
fill_value: object | None
850848

pandas-stubs/core/frame.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ from typing import (
1515
Generic,
1616
Literal,
1717
NoReturn,
18-
overload,
1918
Unpack,
19+
overload,
2020
)
2121

2222
from _typing import TimeZones
@@ -1989,10 +1989,10 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
19891989
def ne(self, other, axis: Axis = ..., level: Level | None = ...) -> Self: ...
19901990
def pct_change(
19911991
self,
1992-
periods: int = ...,
1992+
periods: int = 1,
19931993
fill_method: None = ...,
19941994
limit: int | None = ...,
1995-
freq=...,
1995+
freq: Frequency | dt.timedelta | None = None,
19961996
**kwargs: Unpack[PctChangeKwargs],
19971997
) -> Self: ...
19981998
def pop(self, item: _str) -> Series: ...

pandas-stubs/core/series.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ from typing import (
2121
Generic,
2222
Literal,
2323
NoReturn,
24-
overload,
2524
Unpack,
25+
overload,
2626
)
2727

2828
from _typing import (
@@ -1550,10 +1550,10 @@ class Series(IndexOpsMixin[S1], NDFrame):
15501550
) -> Series[S1]: ...
15511551
def pct_change(
15521552
self,
1553-
periods: int = ...,
1554-
fill_method: _str = ...,
1553+
periods: int = 1,
1554+
fill_method: None = ...,
15551555
limit: int | None = ...,
1556-
freq=...,
1556+
freq: Frequency | timedelta | None = None,
15571557
**kwargs: Unpack[PctChangeKwargs],
15581558
) -> Series[S1]: ...
15591559
def first_valid_index(self) -> Scalar: ...

0 commit comments

Comments
 (0)