Added missing properties to struct_time (#4256)

This commit is contained in:
Milap Sheth
2020-06-22 23:43:53 -04:00
committed by GitHub
parent fb398b1d59
commit 14af8790f3

View File

@@ -31,19 +31,24 @@ if sys.version_info >= (3, 3) and sys.platform != 'win32':
if sys.version_info >= (3, 8) and sys.platform == "darwin":
CLOCK_UPTIME_RAW: int
class _struct_time(NamedTuple):
tm_year: int
tm_mon: int
tm_mday: int
tm_hour: int
tm_min: int
tm_sec: int
tm_wday: int
tm_yday: int
tm_isdst: int
@property
def n_fields(self) -> int: ...
@property
def n_sequence_fields(self) -> int: ...
@property
def n_unnamed_fields(self) -> int: ...
if sys.version_info >= (3, 3):
class _struct_time(NamedTuple):
tm_year: int
tm_mon: int
tm_mday: int
tm_hour: int
tm_min: int
tm_sec: int
tm_wday: int
tm_yday: int
tm_isdst: int
tm_zone: str
tm_gmtoff: int
class struct_time(_struct_time):
def __init__(
self,
@@ -63,17 +68,11 @@ if sys.version_info >= (3, 3):
],
_arg: Any = ...,
) -> struct_time: ...
@property
def tm_zone(self) -> str: ...
@property
def tm_gmtoff(self) -> int: ...
else:
class _struct_time(NamedTuple):
tm_year: int
tm_mon: int
tm_mday: int
tm_hour: int
tm_min: int
tm_sec: int
tm_wday: int
tm_yday: int
tm_isdst: int
class struct_time(_struct_time):
def __init__(self, o: _TimeTuple, _arg: Any = ...) -> None: ...
def __new__(cls, o: _TimeTuple, _arg: Any = ...) -> struct_time: ...