Commit 74576600 authored by adam j hartz's avatar adam j hartz

python 3.7 support

parent 1603c953
......@@ -73,7 +73,7 @@ token_map[tokenize.SEARCHPATH] = 'SEARCHPATH'
token_map[tokenize.NEWLINE] = 'NEWLINE'
token_map[tokenize.INDENT] = 'INDENT'
token_map[tokenize.DEDENT] = 'DEDENT'
if PYTHON_VERSION_INFO >= (3, 5, 0):
if (3, 7, 0) > PYTHON_VERSION_INFO >= (3, 5, 0):
token_map[tokenize.ASYNC] = 'ASYNC'
token_map[tokenize.AWAIT] = 'AWAIT'
......
......@@ -60,8 +60,12 @@ __all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding",
'DOLLARNAME', 'IOREDIRECT']
del token
PY37 = PYTHON_VERSION_INFO >= (3, 5, 0)
PY35 = PYTHON_VERSION_INFO >= (3, 5, 0)
if PY35:
if PY37:
AUGASSIGN_OPS = r"[+\-*/%&@|^=<>]=?"
ADDSPACE_TOKS = (NAME, NUMBER)
elif PY35:
AUGASSIGN_OPS = r"[+\-*/%&@|^=<>]=?"
ADDSPACE_TOKS = (NAME, NUMBER, ASYNC, AWAIT)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment