chore: variable name should comply with naming convention (#38249)

This commit is contained in:
Cesar Kohl 2023-05-15 05:30:22 -03:00 committed by GitHub
parent e7fc1a422d
commit 6645f49a9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ import sys
DEFINE_EXTRACT_REGEX = re.compile('^ *# *define (\w*)', re.MULTILINE) DEFINE_EXTRACT_REGEX = re.compile('^ *# *define (\w*)', re.MULTILINE)
def main(outDir, headers): def main(out_dir, headers):
defines = [] defines = []
for filename in headers: for filename in headers:
with open(filename, 'r') as f: with open(filename, 'r') as f:
@ -15,13 +15,13 @@ def main(outDir, headers):
for define in defines: for define in defines:
push_and_undef += '#pragma push_macro("%s")\n' % define push_and_undef += '#pragma push_macro("%s")\n' % define
push_and_undef += '#undef %s\n' % define push_and_undef += '#undef %s\n' % define
with open(os.path.join(outDir, 'push_and_undef_node_defines.h'), 'w') as o: with open(os.path.join(out_dir, 'push_and_undef_node_defines.h'), 'w') as o:
o.write(push_and_undef) o.write(push_and_undef)
pop = '' pop = ''
for define in defines: for define in defines:
pop += '#pragma pop_macro("%s")\n' % define pop += '#pragma pop_macro("%s")\n' % define
with open(os.path.join(outDir, 'pop_node_defines.h'), 'w') as o: with open(os.path.join(out_dir, 'pop_node_defines.h'), 'w') as o:
o.write(pop) o.write(pop)
def read_defines(content): def read_defines(content):