summaryrefslogtreecommitdiff
path: root/loader.py
diff options
context:
space:
mode:
Diffstat (limited to 'loader.py')
-rw-r--r--loader.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/loader.py b/loader.py
index a9b237f..f99ade7 100644
--- a/loader.py
+++ b/loader.py
@@ -2,9 +2,7 @@
from __future__ import absolute_import
-from typing import Any, Dict, List # NOQA
-
-from ruamel.yaml.compat import StreamTextType, VersionType # NOQA
+import sys
from ruamel.yaml.reader import Reader
from ruamel.yaml.scanner import Scanner, RoundTripScanner
@@ -14,6 +12,10 @@ from ruamel.yaml.constructor import BaseConstructor, SafeConstructor, Constructo
RoundTripConstructor
from ruamel.yaml.resolver import VersionedResolver
+if sys.version_info >= (3, 5, 2):
+ from typing import Any, Dict, List # NOQA
+ from ruamel.yaml.compat import StreamTextType, VersionType # NOQA
+
__all__ = ['BaseLoader', 'SafeLoader', 'Loader', 'RoundTripLoader']