|
| 1 | + |
| 2 | +from datetime import datetime |
| 3 | + |
| 4 | +import numpy as np |
| 5 | + |
| 6 | +NaT: NaTType |
| 7 | +iNaT: int |
| 8 | +nat_strings: set[str] |
| 9 | + |
| 10 | +def is_null_datetimelike(val: object, inat_is_null: bool = ...) -> bool: ... |
| 11 | + |
| 12 | +class NaTType(datetime): |
| 13 | + value: np.int64 |
| 14 | + |
| 15 | + def asm8(self) -> np.datetime64: ... |
| 16 | + def to_datetime64(self) -> np.datetime64: ... |
| 17 | + def to_numpy(self, dtype=..., copy: bool = ...) -> np.datetime64: ... |
| 18 | + |
| 19 | + @property |
| 20 | + def is_leap_year(self) -> bool: ... |
| 21 | + @property |
| 22 | + def is_month_start(self) -> bool: ... |
| 23 | + @property |
| 24 | + def is_quarter_start(self) -> bool: ... |
| 25 | + @property |
| 26 | + def is_year_start(self) -> bool: ... |
| 27 | + @property |
| 28 | + def is_month_end(self) -> bool: ... |
| 29 | + @property |
| 30 | + def is_quarter_end(self) -> bool: ... |
| 31 | + @property |
| 32 | + def is_year_end(self) -> bool: ... |
| 33 | + |
| 34 | + @property |
| 35 | + def day_of_year(self) -> float: ... |
| 36 | + @property |
| 37 | + def dayofyear(self) -> float: ... |
| 38 | + @property |
| 39 | + def days_in_month(self) -> float: ... |
| 40 | + @property |
| 41 | + def daysinmonth(self) -> float: ... |
| 42 | + @property |
| 43 | + def day_of_week(self) -> float: ... |
| 44 | + @property |
| 45 | + def dayofweek(self) -> float: ... |
| 46 | + @property |
| 47 | + def week(self) -> float: ... |
| 48 | + @property |
| 49 | + def weekofyear(self) -> float: ... |
| 50 | + |
| 51 | + def day_name(self) -> float: ... |
| 52 | + def month_name(self) -> float: ... |
| 53 | + |
| 54 | + # error: Return type "float" of "weekday" incompatible with return |
| 55 | + # type "int" in supertype "date" |
| 56 | + def weekday(self) -> float: ... # type: ignore[override] |
| 57 | + |
| 58 | + # error: Return type "float" of "isoweekday" incompatible with return |
| 59 | + # type "int" in supertype "date" |
| 60 | + def isoweekday(self) -> float: ... # type: ignore[override] |
| 61 | + |
| 62 | + def total_seconds(self) -> float: ... |
| 63 | + |
| 64 | + # error: Signature of "today" incompatible with supertype "datetime" |
| 65 | + def today(self, *args, **kwargs) -> NaTType: ... # type: ignore[override] |
| 66 | + # error: Signature of "today" incompatible with supertype "datetime" |
| 67 | + def now(self, *args, **kwargs) -> NaTType: ... # type: ignore[override] |
| 68 | + |
| 69 | + def to_pydatetime(self) -> NaTType: ... |
| 70 | + def date(self) -> NaTType: ... |
| 71 | + |
| 72 | + def round(self) -> NaTType: ... |
| 73 | + def floor(self) -> NaTType: ... |
| 74 | + def ceil(self) -> NaTType: ... |
| 75 | + |
| 76 | + def tz_convert(self) -> NaTType: ... |
| 77 | + def tz_localize(self) -> NaTType: ... |
| 78 | + |
| 79 | + def replace(self, *args, **kwargs) -> NaTType: ... |
| 80 | + |
| 81 | + # error: Return type "float" of "year" incompatible with return |
| 82 | + # type "int" in supertype "date" |
| 83 | + @property |
| 84 | + def year(self) -> float: ... # type: ignore[override] |
| 85 | + |
| 86 | + @property |
| 87 | + def quarter(self) -> float: ... |
| 88 | + |
| 89 | + # error: Return type "float" of "month" incompatible with return |
| 90 | + # type "int" in supertype "date" |
| 91 | + @property |
| 92 | + def month(self) -> float: ... # type: ignore[override] |
| 93 | + |
| 94 | + # error: Return type "float" of "day" incompatible with return |
| 95 | + # type "int" in supertype "date" |
| 96 | + @property |
| 97 | + def day(self) -> float: ... # type: ignore[override] |
| 98 | + |
| 99 | + # error: Return type "float" of "hour" incompatible with return |
| 100 | + # type "int" in supertype "date" |
| 101 | + @property |
| 102 | + def hour(self) -> float: ... # type: ignore[override] |
| 103 | + |
| 104 | + # error: Return type "float" of "minute" incompatible with return |
| 105 | + # type "int" in supertype "date" |
| 106 | + @property |
| 107 | + def minute(self) -> float: ... # type: ignore[override] |
| 108 | + |
| 109 | + # error: Return type "float" of "second" incompatible with return |
| 110 | + # type "int" in supertype "date" |
| 111 | + @property |
| 112 | + def second(self) -> float: ... # type: ignore[override] |
| 113 | + |
| 114 | + @property |
| 115 | + def millisecond(self) -> float: ... |
| 116 | + |
| 117 | + # error: Return type "float" of "microsecond" incompatible with return |
| 118 | + # type "int" in supertype "date" |
| 119 | + @property |
| 120 | + def microsecond(self) -> float: ... # type: ignore[override] |
| 121 | + |
| 122 | + @property |
| 123 | + def nanosecond(self) -> float: ... |
| 124 | + |
| 125 | + # inject Timedelta properties |
| 126 | + @property |
| 127 | + def days(self) -> float: ... |
| 128 | + @property |
| 129 | + def microseconds(self) -> float: ... |
| 130 | + @property |
| 131 | + def nanoseconds(self) -> float: ... |
| 132 | + |
| 133 | + # inject Period properties |
| 134 | + @property |
| 135 | + def qyear(self) -> float: ... |
0 commit comments