We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95ebb1f commit 49e3a3bCopy full SHA for 49e3a3b
sourcemap/decoder.py
@@ -22,9 +22,11 @@
22
23
__all__ = ('SourceMapDecoder',)
24
25
-# True if we are running on Python 3.
26
-PY3 = sys.version_info[0] == 3
27
-text_type = str if PY3 else unicode
+if sys.version_info[0] == 2:
+ from itertools import imap as map
+ text_type = unicode
28
+else:
29
+ text_type = str
30
31
32
class SourceMapDecoder(object):
@@ -115,7 +117,7 @@ def decode(self, source):
115
117
lines = mappings.split(';')
116
118
119
if sourceRoot is not None:
- sources = map(partial(os.path.join, sourceRoot), sources)
120
+ sources = list(map(partial(os.path.join, sourceRoot), sources))
121
122
# List of all tokens
123
tokens = []
0 commit comments