rna_manual_reference_updater: generate file with autopep8 disabled

Also use spaces instead of tabs sice autopep8 makes this change
even when autopep8 is disabled.
This commit is contained in:
Campbell Barton
2022-04-21 10:58:08 +10:00
parent e48e6feb58
commit c7928d427c

View File

@ -41,6 +41,8 @@ def write_mappings(inv, output):
fw("# SPDX-License-Identifier: GPL-2.0-or-later\n")
fw("# Do not edit this file.")
fw(" This file is auto generated from rna_manual_reference_updater.py\n\n")
# Prevent systems with autopep8 configured from re-formatting the file.
fw("# autopep8: off\n")
fw("import bpy\n\n")
fw("manual_version = '%d.%d' % bpy.app.version[:2]\n\n")
fw("url_manual_prefix = \"https://docs.blender.org/manual/en/\" + manual_version + \"/\"\n\n")
@ -90,9 +92,10 @@ def write_mappings(inv, output):
lines.sort(key=lambda l: l.find(" "), reverse=True)
for line in lines:
split = line.split(" ")
fw("\t(\"" + split[0] + "*\", \"" + split[3] + "\"),\n")
fw(" (\"" + split[0] + "*\", \"" + split[3] + "\"),\n")
fw(")\n")
fw(")\n\n")
fw("# autopep8: on\n")
def is_valid_file(parser, arg):