Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions pandas-stubs/core/indexes/datetimes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ from datetime import (
timedelta,
tzinfo,
)
from typing import overload
from typing import (
Hashable,
Literal,
Sequence,
overload,
)

import numpy as np
from pandas import (
Expand Down Expand Up @@ -87,23 +92,24 @@ def date_range(
start: str | DatetimeLike | None = ...,
end: str | DatetimeLike | None = ...,
periods: int | None = ...,
# TODO: Test timedelta and Timedelta, update pandas docs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are tested, and the docs are updated (I did them).

freq: str | timedelta | Timedelta | BaseOffset = ...,
tz: str | tzinfo = ...,
normalize: bool = ...,
name: str | None = ...,
inclusive: IntervalClosedType = ...,
**kwargs,
name: Hashable | None = ...,
inclusive: Literal["left", "right"] | None = ...,
) -> DatetimeIndex: ...
def bdate_range(
start: str | DatetimeLike | None = ...,
end: str | DatetimeLike | None = ...,
periods: int | None = ...,
# TODO: Test timedelta and Timedelta, update pandas docs
freq: str | timedelta | Timedelta | BaseOffset = ...,
tz: str | tzinfo = ...,
normalize: bool = ...,
name: str | None = ...,
name: Hashable | None = ...,
weekmask: str | None = ...,
holidays: list | None = ...,
inclusive: IntervalClosedType = ...,
**kwargs,
# TODO: Check if dt.date is allowed
holidays: list[str | DatetimeLike] | None = ...,
inclusive: Literal["left", "right"] | None = ...,
) -> DatetimeIndex: ...