Skip to content

Commit 446429a

Browse files
author
MattDMo
committed
Updated illegal names (aka keywords) - added False, None, True
1 parent 705d42a commit 446429a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

PythonImproved-Unicode.YAML-tmLanguage

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,13 +711,16 @@ repository:
711711
match: (\.\b([\p{Alpha}_][\p{Alnum}_]*)\b(?!\(|\[)|\b([\p{Alpha}_][\p{Alnum}_]*)\b\.)
712712

713713
illegal_names:
714+
comment: from Lib/keyword.py, in kwlist. `async` and `await` not keywords
715+
until Python 3.7 (according to PEP-0492)
714716
name: invalid.illegal.name.python
715717
match: |
716718
(?x)
717719
\b (
718-
and | as | assert | await | break | class | continue | def | del | elif | else |
719-
except | exec | finally | for | from | global | if | import | in | is | lambda |
720-
nonlocal | not | or | pass | print | raise | return | try | while | with | yield)
720+
False | None | True | and | as | assert | break | class | continue | def |
721+
del | elif | else | except | exec | finally | for | from | global | if |
722+
import | in | is | lambda | nonlocal | not | or | pass | print | raise |
723+
return | try | while | with | yield)
721724
\b
722725
723726
keyword_arguments:

0 commit comments

Comments
 (0)