improvements for tests failing

This commit is contained in:
Alex Prabhat Bara 2025-02-08 17:47:35 +05:30 committed by GitHub
parent 7dd21943bf
commit 983f48db7d
Failed to generate hash of commit

View file

@ -1064,7 +1064,7 @@ def _tokenize(readline, encoding, tolerant=False, tokenize_ioredirects=True):
break break
else: # ordinary string else: # ordinary string
yield TokenInfo(STRING, token, spos, epos, line) yield TokenInfo(STRING, token, spos, epos, line)
elif token.startswith("$"): elif token.startswith("$") and token[1] not in (LBRACE, LPAR, LSQB):
yield TokenInfo(DOLLARNAME, token, spos, epos, line) yield TokenInfo(DOLLARNAME, token, spos, epos, line)
elif initial.isidentifier(): # ordinary name elif initial.isidentifier(): # ordinary name
if token in ("async", "await"): if token in ("async", "await"):