summaryrefslogtreecommitdiff
path: root/timestamp.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-03-21 17:18:18 +0100
committerAnthon van der Neut <anthon@mnt.org>2017-03-21 17:18:18 +0100
commit9ac44a0873d51d63150b0f1dc1d009b206577a29 (patch)
tree44fc2ecbdba2a6a63544097d7b9f63d8f87d5aae /timestamp.py
parentc8568f99215aaa910953287f63a25459e3800dfc (diff)
downloadruamel.yaml-9ac44a0873d51d63150b0f1dc1d009b206577a29.tar.gz
update for mypy --strict, prepare de-inheritance (Loader/Dumper)0.14.0
Diffstat (limited to 'timestamp.py')
-rw-r--r--timestamp.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/timestamp.py b/timestamp.py
index 8b8715d..02ea085 100644
--- a/timestamp.py
+++ b/timestamp.py
@@ -5,15 +5,20 @@ from __future__ import print_function, absolute_import, division, unicode_litera
import datetime
import copy
+from typing import Any, Dict, Optional, List # NOQA
+
class TimeStamp(datetime.datetime):
def __init__(self, *args, **kw):
- self._yaml = dict(t=False, tz=None, delta=0)
+ # type: (Any, Any) -> None
+ self._yaml = dict(t=False, tz=None, delta=0) # type: Dict[Any, Any]
def __new__(cls, *args, **kw): # datetime is immutable
- return datetime.datetime.__new__(cls, *args, **kw)
+ # type: (Any, Any) -> Any
+ return datetime.datetime.__new__(cls, *args, **kw) # type: ignore
def __deepcopy__(self, memo):
+ # type: (Any) -> Any
ts = TimeStamp(self.year, self.month, self.day,
self.hour, self.minute, self.second)
ts._yaml = copy.deepcopy(self._yaml)