Strengthen typing of datetime methods of Google protobuf's Timestamp. (#2590)

This commit is contained in:
Pascal Corpet
2018-11-07 01:46:02 +01:00
committed by Sebastian Rittau
parent 0ebba82bfc
commit 23db1fc137

View File

@@ -1,4 +1,5 @@
from typing import Any, Optional
from datetime import datetime
class Error(Exception): ...
class ParseError(Error): ...
@@ -27,8 +28,8 @@ class Timestamp:
def FromMicroseconds(self, micros: Any) -> None: ...
def FromMilliseconds(self, millis: Any) -> None: ...
def FromSeconds(self, seconds: Any) -> None: ...
def ToDatetime(self): ...
def FromDatetime(self, dt: Any) -> None: ...
def ToDatetime(self) -> datetime: ...
def FromDatetime(self, dt: datetime) -> None: ...
class Duration:
def ToJsonString(self): ...