token: add TYPE_COMMENT, remove AWAIT, ASYNC for py37 (#3588)

flake8 is a little picky about how we do checks against
sys.version_info
This commit is contained in:
hauntsaninja
2020-01-07 23:18:53 -08:00
committed by Jelle Zijlstra
parent 4aa6dfccdb
commit da9b7dd7c8

View File

@@ -58,6 +58,11 @@ if sys.version_info >= (3,):
ELLIPSIS: int
if sys.version_info >= (3, 5):
ATEQUAL: int
if sys.version_info < (3, 7):
# These were removed in Python 3.7 but added back in Python 3.8
AWAIT: int
ASYNC: int
if sys.version_info >= (3, 8):
AWAIT: int
ASYNC: int
OP: int
@@ -69,6 +74,8 @@ if sys.version_info >= (3, 7):
COMMENT: int
NL: int
ENCODING: int
if sys.version_info >= (3, 8):
TYPE_COMMENT: int
def ISTERMINAL(x: int) -> bool: ...
def ISNONTERMINAL(x: int) -> bool: ...