diff --git a/pandas-stubs/_libs/tslibs/dtypes.pyi b/pandas-stubs/_libs/tslibs/dtypes.pyi deleted file mode 100644 index 6b39cecf..00000000 --- a/pandas-stubs/_libs/tslibs/dtypes.pyi +++ /dev/null @@ -1,27 +0,0 @@ -from .offsets import BaseOffset - -class PeriodDtypeBase: - def __init__(self, code: int) -> None: ... - def __eq__(self, other) -> bool: ... - @property - def date_offset(self) -> BaseOffset: ... - @classmethod - def from_date_offset(cls, offset: BaseOffset) -> PeriodDtypeBase: ... - -class FreqGroup: - FR_ANN: int - FR_QTR: int - FR_MTH: int - FR_WK: int - FR_BUS: int - FR_DAY: int - FR_HR: int - FR_MIN: int - FR_SEC: int - FR_MS: int - FR_US: int - FR_NS: int - FR_UND: int - - @staticmethod - def get_freq_group(code: int) -> int: ... diff --git a/pandas-stubs/_libs/tslibs/nattype.pyi b/pandas-stubs/_libs/tslibs/nattype.pyi index cc74db15..40f74549 100644 --- a/pandas-stubs/_libs/tslibs/nattype.pyi +++ b/pandas-stubs/_libs/tslibs/nattype.pyi @@ -1,3 +1,4 @@ +# pyright: strict from datetime import ( datetime, timedelta, @@ -11,7 +12,10 @@ from typing_extensions import ( ) from pandas._libs.tslibs.period import Period -from pandas._typing import TimeUnit +from pandas._typing import ( + NpDtype, + TimeUnit, +) NaT: NaTType iNaT: int @@ -30,7 +34,7 @@ class NaTType: def asm8(self) -> np.datetime64: ... def to_datetime64(self) -> np.datetime64: ... def to_numpy( - self, dtype: np.dtype | str | None = ..., copy: bool = ... + self, dtype: NpDtype | None = ..., copy: bool = ... ) -> np.datetime64 | np.timedelta64: ... @property def is_leap_year(self) -> bool: ... @@ -67,8 +71,8 @@ class NaTType: def weekday(self) -> float: ... def isoweekday(self) -> float: ... def total_seconds(self) -> float: ... - def today(self, *args, **kwargs) -> NaTType: ... - def now(self, *args, **kwargs) -> NaTType: ... + def today(self, tz: _tzinfo | str | None = ...) -> NaTType: ... + def now(self, tz: _tzinfo | str | None = ...) -> NaTType: ... def to_pydatetime(self) -> NaTType: ... def date(self) -> NaTType: ... def round(self) -> NaTType: ...