From 909171f93bbad505d35f2856e0105f173858ea5f Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Thu, 15 Aug 2019 22:37:48 +0200 Subject: mypy, split contruct_object 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))* --- representer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'representer.py') 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): -- cgit v1.2.1