mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-24 15:28:10 +00:00
core: remove qstr blacklist
As its no longer needed. Mirrors micropython change a09fd0475.
This commit is contained in:
parent
5aca68e50c
commit
f526818603
@ -1,17 +1,14 @@
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
QSTR_BLACKLIST = set(['NULL', 'number_of'])
|
|
||||||
|
|
||||||
|
|
||||||
def process(source, target):
|
def process(source, target):
|
||||||
re_qstr = re.compile(r'MP_QSTR_[_a-zA-Z0-9]+')
|
re_qstr = re.compile(r"MP_QSTR_[_a-zA-Z0-9]+")
|
||||||
for line in source:
|
for line in source:
|
||||||
for match in re_qstr.findall(line):
|
for match in re_qstr.findall(line):
|
||||||
name = match.replace('MP_QSTR_', '')
|
name = match.replace("MP_QSTR_", "")
|
||||||
if name not in QSTR_BLACKLIST:
|
target.write("Q(%s)\n" % name)
|
||||||
target.write('Q(%s)\n' % name)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
process(sys.stdin, sys.stdout)
|
process(sys.stdin, sys.stdout)
|
||||||
|
Loading…
Reference in New Issue
Block a user