summaryrefslogtreecommitdiff
path: root/scanner.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-03-22 15:53:24 +0100
committerAnthon van der Neut <anthon@mnt.org>2017-03-22 15:53:24 +0100
commit40c95ca1b92ced97ba85b1a1dd5b46754f6ab0c7 (patch)
treedc52888ff411545a6546fc1638ecd242aeb25247 /scanner.py
parentc15232bf77e29c1e739d8632cd3d2a48909c4f05 (diff)
downloadruamel.yaml-40c95ca1b92ced97ba85b1a1dd5b46754f6ab0c7.tar.gz
fix issue 106, Text undefined in 3.5.10.14.1
Reported by Charles Bouchard-L?gar?
Diffstat (limited to 'scanner.py')
-rw-r--r--scanner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scanner.py b/scanner.py
index 68b043c..3a95d4e 100644
--- a/scanner.py
+++ b/scanner.py
@@ -30,12 +30,15 @@ from __future__ import print_function, absolute_import, division, unicode_litera
# Read comments in the Scanner code for more details.
#
-from typing import Any, Dict, Optional, List, Union, Text # NOQA
+import sys
from ruamel.yaml.error import MarkedYAMLError
from ruamel.yaml.tokens import * # NOQA
from ruamel.yaml.compat import utf8, unichr, PY3, check_anchorname_char
+if sys.version_info >= (3, 5, 2):
+ from typing import Any, Dict, Optional, List, Union, Text # NOQA
+
__all__ = ['Scanner', 'RoundTripScanner', 'ScannerError']