summaryrefslogtreecommitdiff
path: root/compat.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2016-08-15 22:46:12 +0200
committerAnthon van der Neut <anthon@mnt.org>2016-08-15 22:46:12 +0200
commit438db3b9b29e997a6fc2674c95a2c76192b5a567 (patch)
treec16dc7d660b8d62862564fa669377623adb3a159 /compat.py
parent0da1ffde8bf06a1c84693a431aa3de5b02e767b6 (diff)
downloadruamel.yaml-438db3b9b29e997a6fc2674c95a2c76192b5a567.tar.gz
initial type info, drop 2.60.12.0
Diffstat (limited to 'compat.py')
-rw-r--r--compat.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/compat.py b/compat.py
index abd10ac..e4b30ab 100644
--- a/compat.py
+++ b/compat.py
@@ -9,15 +9,15 @@ import os
import types
try:
- from ruamel.ordereddict import ordereddict
+ from ruamel.ordereddict import ordereddict # type: ignore
except:
try:
from collections import OrderedDict
except ImportError:
- from orderddict import OrderedDict
+ from orderddict import OrderedDict # type: ignore
# to get the right name import ... as ordereddict doesn't do that
- class ordereddict(OrderedDict):
+ class ordereddict(OrderedDict): # type: ignore
if not hasattr(OrderedDict, 'insert'):
def insert(self, pos, key, value):
if pos >= len(self):
@@ -64,7 +64,7 @@ if PY3:
binary_type = bytes
MAXSIZE = sys.maxsize
- unichr = chr
+ unichr = chr # type: ignore
import io
StringIO = io.StringIO
BytesIO = io.BytesIO
@@ -76,9 +76,9 @@ else:
text_type = unicode
binary_type = str
- unichr = unichr # to allow importing
- import StringIO
- StringIO = StringIO.StringIO
+ unichr = unichr # type: ignore to allow importing
+ from StringIO import StringIO as _StringIO
+ StringIO = _StringIO
import cStringIO
BytesIO = cStringIO.StringIO