Skip to content

Commit f18f651

Browse files
Add check assert_type to tests for frame.py and add __new__ method for DatetimeIndex
1 parent 1168ec7 commit f18f651

File tree

2 files changed

+334
-181
lines changed

2 files changed

+334
-181
lines changed

pandas-stubs/core/indexes/datetimes.pyi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ from pandas import (
2323
from pandas.core.indexes.accessors import DatetimeIndexProperties
2424
from pandas.core.indexes.datetimelike import DatetimeTimedeltaMixin
2525
from pandas.core.series import (
26+
Series,
2627
TimedeltaSeries,
2728
TimestampSeries,
2829
)
@@ -56,6 +57,19 @@ class DatetimeIndex(DatetimeTimedeltaMixin[Timestamp], DatetimeIndexProperties):
5657
copy: bool = ...,
5758
name: Hashable = ...,
5859
) -> None: ...
60+
@classmethod
61+
def __new__(
62+
cls,
63+
data: AxesData | Series,
64+
freq: Frequency = ...,
65+
tz: TimeZones = ...,
66+
ambiguous: str = ...,
67+
dayfirst: bool = ...,
68+
yearfirst: bool = ...,
69+
dtype: Dtype = ...,
70+
copy: bool = ...,
71+
name: Hashable = ...,
72+
) -> Self: ...
5973
def __reduce__(self): ...
6074
# various ignores needed for mypy, as we do want to restrict what can be used in
6175
# arithmetic for these types

0 commit comments

Comments
 (0)