Skip to content
Prev Previous commit
Next Next commit
hightime: Move ClassVars to the top
  • Loading branch information
bkeryan committed Apr 3, 2025
commit 6d41c0d3fff4539e0638eed7cf544ba00d170093
6 changes: 3 additions & 3 deletions hightime/_datetime.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ from typing import Any, ClassVar, Optional, SupportsIndex, overload
import hightime

class datetime(std_datetime.datetime):
min: ClassVar[datetime]
max: ClassVar[datetime]
resolution: ClassVar[hightime.timedelta]
def __add__(self, other: std_datetime.timedelta, /) -> datetime: ...
def __eq__(self, other: object, /) -> bool: ...
def __ge__(self, other: std_datetime.date, /) -> bool: ...
Expand Down Expand Up @@ -73,8 +76,6 @@ class datetime(std_datetime.datetime):
cls, t: float, tz: Optional[std_datetime._TzInfo] = ...
) -> datetime: ...
def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ...
max: ClassVar[datetime]
min: ClassVar[datetime]
def replace( # type: ignore[override]
self,
year: SupportsIndex = ...,
Expand All @@ -89,7 +90,6 @@ class datetime(std_datetime.datetime):
tzinfo: Optional[std_datetime._TzInfo] = ...,
**kwargs: Any,
) -> datetime: ...
resolution: ClassVar[hightime.timedelta]
@classmethod
def utcfromtimestamp(cls, t: float, /) -> datetime: ...
@property
Expand Down
6 changes: 3 additions & 3 deletions hightime/_timedelta.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ from decimal import Decimal
from typing import ClassVar, overload

class timedelta(std_datetime.timedelta):
min: ClassVar[timedelta]
max: ClassVar[timedelta]
resolution: ClassVar[timedelta]
def __abs__(self) -> timedelta: ...
def __add__(self, other: std_datetime.timedelta, /) -> timedelta: ...
def __bool__(self) -> bool: ...
Expand Down Expand Up @@ -55,10 +58,7 @@ class timedelta(std_datetime.timedelta):
def _cmp(self, other: object, /) -> int: ...
@property
def femtoseconds(self) -> int: ...
max: ClassVar[timedelta]
min: ClassVar[timedelta]
def precision_total_seconds(self) -> Decimal: ...
resolution: ClassVar[timedelta]
def total_seconds(self) -> float: ...
@property
def yoctoseconds(self) -> int: ...