Add __new__ to time.struct_time (#1394)

This is needed because otherwise pytype uses the `__new__` inherited from the `NamedTuple` base class.
This commit is contained in:
rchen152
2017-06-06 15:36:01 -07:00
committed by Guido van Rossum
parent 0679e0232c
commit 16ec7cbdf0
2 changed files with 13 additions and 0 deletions

View File

@@ -17,6 +17,9 @@ class struct_time(NamedTuple('_struct_time',
def __init__(self, o: Tuple[int, int, int,
int, int, int,
int, int, int], _arg: Any = ...) -> None: ...
def __new__(cls, o: Tuple[int, int, int,
int, int, int,
int, int, int], _arg: Any = ...) -> struct_time: ...
_TIME_TUPLE = Tuple[int, int, int, int, int, int, int, int, int]