mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 19:32:13 +08:00
Strengthen typing of datetime methods of Google protobuf's Timestamp. (#2590)
This commit is contained in:
committed by
Sebastian Rittau
parent
0ebba82bfc
commit
23db1fc137
@@ -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): ...
|
||||
|
||||
Reference in New Issue
Block a user