In Python 3.7, “async” and “await” are now tokenized as NAME token. A fix suggested by @njsmith that would also work for Python 2 would be to stop looking at token type and just look for tokens whose text is "async" or "await" since they can only have one meaning in bleached code anyway.
In Python 3.7, “async” and “await” are now tokenized as NAME token. A fix suggested by @njsmith that would also work for Python 2 would be to stop looking at token type and just look for tokens whose text is "async" or "await" since they can only have one meaning in bleached code anyway.