Highlight lazy imports in the new REPL

This commit is contained in:
bswck 2025-10-04 01:02:12 +02:00
parent 5d6026a800
commit c0c0d80a75
No known key found for this signature in database
2 changed files with 5 additions and 0 deletions

View file

@ -270,6 +270,8 @@ def is_soft_keyword_used(*tokens: TI | None) -> bool:
TI(T.NAME, string=s)
):
return not keyword.iskeyword(s)
case (None | TI(T.NEWLINE) | TI(T.INDENT) | TI(T.DEDENT), TI(string="lazy"), TI(string="import")):
return True
case _:
return False