type annotation for Timestamp and Duration (#4471)

This commit is contained in:
Cerek Hillen
2020-08-26 02:29:34 -04:00
committed by GitHub
parent ab0f5519a9
commit 142aed3838

View File

@@ -1,4 +1,4 @@
from datetime import datetime
from datetime import datetime, timedelta
from typing import Any, Optional
class Error(Exception): ...
@@ -16,36 +16,36 @@ class Any_:
class Timestamp:
def ToJsonString(self) -> str: ...
seconds: Any = ...
nanos: Any = ...
def FromJsonString(self, value: Any) -> None: ...
seconds: int = ...
nanos: int = ...
def FromJsonString(self, value: str) -> None: ...
def GetCurrentTime(self) -> None: ...
def ToNanoseconds(self): ...
def ToMicroseconds(self): ...
def ToMilliseconds(self): ...
def ToSeconds(self): ...
def FromNanoseconds(self, nanos: Any) -> None: ...
def FromMicroseconds(self, micros: Any) -> None: ...
def FromMilliseconds(self, millis: Any) -> None: ...
def FromSeconds(self, seconds: Any) -> None: ...
def ToNanoseconds(self) -> int: ...
def ToMicroseconds(self) -> int: ...
def ToMilliseconds(self) -> int: ...
def ToSeconds(self) -> int: ...
def FromNanoseconds(self, nanos: int) -> None: ...
def FromMicroseconds(self, micros: int) -> None: ...
def FromMilliseconds(self, millis: int) -> None: ...
def FromSeconds(self, seconds: int) -> None: ...
def ToDatetime(self) -> datetime: ...
def FromDatetime(self, dt: datetime) -> None: ...
class Duration:
def ToJsonString(self) -> str: ...
seconds: Any = ...
nanos: Any = ...
seconds: int = ...
nanos: int = ...
def FromJsonString(self, value: Any) -> None: ...
def ToNanoseconds(self): ...
def ToMicroseconds(self): ...
def ToMilliseconds(self): ...
def ToSeconds(self): ...
def FromNanoseconds(self, nanos: Any) -> None: ...
def FromMicroseconds(self, micros: Any) -> None: ...
def FromMilliseconds(self, millis: Any) -> None: ...
def FromSeconds(self, seconds: Any) -> None: ...
def ToTimedelta(self): ...
def FromTimedelta(self, td: Any) -> None: ...
def ToNanoseconds(self) -> int: ...
def ToMicroseconds(self) -> int: ...
def ToMilliseconds(self) -> int: ...
def ToSeconds(self) -> int: ...
def FromNanoseconds(self, nanos: int) -> None: ...
def FromMicroseconds(self, micros: int) -> None: ...
def FromMilliseconds(self, millis: int) -> None: ...
def FromSeconds(self, seconds: int) -> None: ...
def ToTimedelta(self) -> timedelta: ...
def FromTimedelta(self, td: timedelta) -> None: ...
class FieldMask:
def ToJsonString(self) -> str: ...