We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c779f23 commit d1cdda5Copy full SHA for d1cdda5
1 file changed
Lib/_pyrepl/utils.py
@@ -257,6 +257,14 @@ def is_soft_keyword_used(*tokens: TI | None) -> bool:
257
return True
258
case (TI(string="case"), TI(string="_"), TI(string=":")):
259
260
+ case (
261
+ None | TI(T.NEWLINE) | TI(T.INDENT) | TI(string=":"),
262
+ TI(string="type"),
263
+ TI(T.NAME, string=s)
264
+ ):
265
+ if keyword.iskeyword(s):
266
+ return False
267
+ return True
268
case _:
269
return False
270
0 commit comments