mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
type annotation for Timestamp and Duration (#4471)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user