Skip to content

Commit

Permalink
GH1065 timestamp freq argument and DataFrame/Series.mask (#1066)
Browse files Browse the repository at this point in the history
* GH1065 Timestamp freq argument removal

* GH1065 Add details to type of other in mask

* GH1065 Revert json

* GH1065 Realign Timestamp args with pandas
  • Loading branch information
loicdiridollou authored Dec 1, 2024
1 parent d4d399e commit 4529b51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions pandas-stubs/_libs/tslibs/timestamps.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,18 @@ class Timestamp(datetime):
def __new__(
cls,
ts_input: np.integer | float | str | _date | datetime | np.datetime64 = ...,
# Freq is deprecated but is left in to allow code like Timestamp(2000,1,1)
# Removing it would make the other arguments position only
freq: int | str | BaseOffset | None = ...,
tz: str | _tzinfo | int | None = ...,
unit: str | int | None = ...,
year: int | None = ...,
month: int | None = ...,
day: int | None = ...,
hour: int | None = ...,
minute: int | None = ...,
second: int | None = ...,
microsecond: int | None = ...,
nanosecond: int | None = ...,
tzinfo: _tzinfo | None = ...,
*,
nanosecond: int | None = ...,
tz: str | _tzinfo | int | None = ...,
unit: str | int | None = ...,
fold: Literal[0, 1] | None = ...,
) -> Self: ...
# GH 46171
Expand Down Expand Up @@ -119,8 +116,6 @@ class Timestamp(datetime):
def fromordinal(
cls,
ordinal: int,
# freq produces a FutureWarning about being deprecated in a future version
freq: None = ...,
tz: _tzinfo | str | None = ...,
) -> Self: ...
@classmethod
Expand Down
2 changes: 1 addition & 1 deletion pandas-stubs/core/frame.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ class DataFrame(NDFrame, OpsMixin):
| Callable[[DataFrame], DataFrame]
| Callable[[Any], _bool]
),
other=...,
other: Scalar | Series[S1] | DataFrame | Callable | NAType | None = ...,
*,
inplace: _bool = ...,
axis: Axis | None = ...,
Expand Down

0 comments on commit 4529b51

Please sign in to comment.