async is actually a token that cannot appear in brackets

This commit is contained in:
Dave Halter committed 2020-04-04 23:14:10 +02:00
1 parent bcf76949b6
commit 67ebb6acac
2 files changed
+24

No files matched your search

+2
View File
@@ -258,6 +258,8 @@ def _create_token_collection(version_info):
ALWAYS_BREAK_TOKENS = (';', 'import', 'class', 'def', 'try', 'except',
'finally', 'while', 'with', 'return')
if version_info >= (3, 5):
ALWAYS_BREAK_TOKENS += ('async',)
pseudo_token_compiled = _compile(PseudoToken)
return TokenCollection(
pseudo_token_compiled, single_quoted, triple_quoted, endpats,