mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-03 08:23:47 +08:00
Strengthen typing of datetime methods of Google protobuf's Timestamp. (#2590)
This commit is contained in:
1 parent
0ebba82bfc
commit
23db1fc137
1 file changed
+3
-2
@@ -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