-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Expand file tree
/
Copy pathdatetime.pyi
More file actions
22 lines (20 loc) · 1 KB
/
datetime.pyi
File metadata and controls
22 lines (20 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Minimal datetime stub for testing unsafe subtype checking
from typing import ClassVar
class date:
def __init__(self, year: int, month: int, day: int) -> None: ...
@classmethod
def today(cls) -> date: ...
def __lt__(self, other: date) -> bool: ...
def __le__(self, other: date) -> bool: ...
def __gt__(self, other: date) -> bool: ...
def __ge__(self, other: date) -> bool: ...
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...
class datetime(date):
def __init__(self, year: int, month: int, day: int, hour: int = 0, minute: int = 0, second: int = 0, microsecond: int = 0) -> None: ...
@classmethod
def now(cls) -> datetime: ...
def __lt__(self, other: datetime) -> bool: ... # type: ignore[override]
def __le__(self, other: datetime) -> bool: ... # type: ignore[override]
def __gt__(self, other: datetime) -> bool: ... # type: ignore[override]
def __ge__(self, other: datetime) -> bool: ... # type: ignore[override]