A small improvement to python -m parso.python.tokenize

This commit is contained in:
Dave Halter
2017-08-05 01:16:30 +02:00
parent e62a88b190
commit 5fd6469b6f

View File

@@ -406,9 +406,10 @@ if __name__ == "__main__":
else:
code = sys.stdin.read()
from parso.utils import source_to_unicode, parse_version_string
if isinstance(code, bytes):
from parso.utils import source_to_unicode
code = source_to_unicode(code)
for token in tokenize(code):
for token in tokenize(code, parse_version_string()):
print(token)