summaryrefslogtreecommitdiff
path: root/representer.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-05 23:20:17 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-05 23:20:17 +0200
commitbfd63d6184e3a43cb63e0831467819bc44513d50 (patch)
tree9426b3c93cb1fd7849ea678424b6bbd900ff2d68 /representer.py
parent893db272efb6d7041e09aa09f04da2010ec92072 (diff)
downloadruamel.yaml-bfd63d6184e3a43cb63e0831467819bc44513d50.tar.gz
added context manager, mypy cleanup (w. Optional) added tests0.15.50
Diffstat (limited to 'representer.py')
-rw-r--r--representer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/representer.py b/representer.py
index 07b2535..a659977 100644
--- a/representer.py
+++ b/representer.py
@@ -26,7 +26,7 @@ else:
import copy_reg as copyreg # type: ignore
if False: # MYPY
- from typing import Dict, List, Any, Union, Text # NOQA
+ from typing import Dict, List, Any, Union, Text, Optional # NOQA
# fmt: off
__all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer',
@@ -62,7 +62,7 @@ class BaseRepresenter(object):
self.default_flow_style = default_flow_style
self.represented_objects = {} # type: Dict[Any, Any]
self.object_keeper = [] # type: List[Any]
- self.alias_key = None # type: Union[None, int]
+ self.alias_key = None # type: Optional[int]
@property
def serializer(self):