diff options
Diffstat (limited to 'serializer.py')
-rw-r--r-- | serializer.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/serializer.py b/serializer.py index 7cac44d..30348f3 100644 --- a/serializer.py +++ b/serializer.py @@ -4,11 +4,10 @@ from __future__ import absolute_import import re -from typing import Any, Dict, Union, Text # NOQA +import sys from ruamel.yaml.error import YAMLError from ruamel.yaml.compat import nprint, DBG_NODE, dbg, string_types -from ruamel.yaml.compat import VersionType # NOQA from ruamel.yaml.events import ( StreamStartEvent, StreamEndEvent, MappingStartEvent, MappingEndEvent, @@ -19,6 +18,10 @@ from ruamel.yaml.nodes import ( MappingNode, ScalarNode, SequenceNode, ) +if sys.version_info >= (3, 5, 2): + from typing import Any, Dict, Union, Text # NOQA + from ruamel.yaml.compat import VersionType # NOQA + __all__ = ['Serializer', 'SerializerError'] |