Skip to content

Commit

Permalink
fix(script): fix CI break by allowing to use del in variable name
Browse files Browse the repository at this point in the history
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
  • Loading branch information
XuNeo committed Jan 4, 2024
1 parent a75033a commit dab9edf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gen/gen_mpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def function_prototype(func):

# Prevent identifier names which are Python reserved words (add underscore in such case)
def sanitize(id, kwlist =
['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else',
['False', 'None', 'True', 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'elif', 'else',
'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or',
'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']):
if id in kwlist:
Expand Down

0 comments on commit dab9edf

Please sign in to comment.