build(gen_vimdoc): remove needless list creation and unused variable (#19079)

build(gen_vimdoc): remove needless list creation
This commit is contained in:
Axis 2022-06-25 15:33:02 +05:30 committed by GitHub
parent 88a5941598
commit ece2960f1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,8 +59,8 @@ if sys.version_info < MIN_PYTHON_VERSION:
print("requires Python {}.{}+".format(*MIN_PYTHON_VERSION)) print("requires Python {}.{}+".format(*MIN_PYTHON_VERSION))
sys.exit(1) sys.exit(1)
doxygen_version = tuple([int(i) for i in subprocess.check_output(["doxygen", "-v"], doxygen_version = tuple((int(i) for i in subprocess.check_output(["doxygen", "-v"],
universal_newlines=True).split()[0].split('.')]) universal_newlines=True).split()[0].split('.')))
if doxygen_version < MIN_DOXYGEN_VERSION: if doxygen_version < MIN_DOXYGEN_VERSION:
print("\nRequires doxygen {}.{}.{}+".format(*MIN_DOXYGEN_VERSION)) print("\nRequires doxygen {}.{}.{}+".format(*MIN_DOXYGEN_VERSION))
@ -1096,7 +1096,6 @@ def main(config, args):
docs = '' docs = ''
i = 0
for filename in CONFIG[target]['section_order']: for filename in CONFIG[target]['section_order']:
try: try:
title, helptag, section_doc = sections.pop(filename) title, helptag, section_doc = sections.pop(filename)
@ -1104,7 +1103,6 @@ def main(config, args):
msg(f'warning: empty docs, skipping (target={target}): {filename}') msg(f'warning: empty docs, skipping (target={target}): {filename}')
msg(f' existing docs: {sections.keys()}') msg(f' existing docs: {sections.keys()}')
continue continue
i += 1
if filename not in CONFIG[target]['append_only']: if filename not in CONFIG[target]['append_only']:
docs += sep docs += sep
docs += '\n%s%s' % (title, docs += '\n%s%s' % (title,