summaryrefslogtreecommitdiff
path: root/representer.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2019-08-15 22:37:48 +0200
committerAnthon van der Neut <anthon@mnt.org>2019-08-15 22:37:48 +0200
commit909171f93bbad505d35f2856e0105f173858ea5f (patch)
tree2f60cc5be35af933c2c3267694e0a712cf29578b /representer.py
parent1c628953c71f2e2f0cd01d643ca239e23c2e15cc (diff)
downloadruamel.yaml-909171f93bbad505d35f2856e0105f173858ea5f.tar.gz
mypy, split contruct_object0.16.3
fixes issue #306 *When this change indeed resolves your problem, please **Close** this issue*. *(You can do so using the WorkFlow pull-down (close to the top right of this page))*
Diffstat (limited to 'representer.py')
-rw-r--r--representer.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/representer.py b/representer.py
index 946a909..a0078f2 100644
--- a/representer.py
+++ b/representer.py
@@ -5,7 +5,8 @@ from __future__ import print_function, absolute_import, division
from ruamel.yaml.error import * # NOQA
from ruamel.yaml.nodes import * # NOQA
-from ruamel.yaml.compat import text_type, binary_type, to_unicode, PY2, PY3, ordereddict
+from ruamel.yaml.compat import text_type, binary_type, to_unicode, PY2, PY3
+from ruamel.yaml.compat import ordereddict # type: ignore
from ruamel.yaml.compat import nprint, nprintf # NOQA
from ruamel.yaml.scalarstring import (
LiteralScalarString,
@@ -83,8 +84,8 @@ class BaseRepresenter(object):
# type: (Any) -> None
node = self.represent_data(data)
self.serializer.serialize(node)
- self.represented_objects = {} # type: Dict[Any, Any]
- self.object_keeper = [] # type: List[Any]
+ self.represented_objects = {}
+ self.object_keeper = []
self.alias_key = None
def represent_data(self, data):