Cleanup: remove redundant f-string use
This commit is contained in:
parent
937776b555
commit
ae950451ea
@ -33,7 +33,7 @@ def main() -> None:
|
|||||||
blender_srcdir = Path(__file__).absolute().parent.parent.parent
|
blender_srcdir = Path(__file__).absolute().parent.parent.parent
|
||||||
|
|
||||||
cli_parser = argparse.ArgumentParser(
|
cli_parser = argparse.ArgumentParser(
|
||||||
description=f"Create a tarball of the Blender sources, optionally including sources of dependencies.",
|
description="Create a tarball of the Blender sources, optionally including sources of dependencies.",
|
||||||
epilog="This script is intended to be run by `make source_archive_complete`.",
|
epilog="This script is intended to be run by `make source_archive_complete`.",
|
||||||
)
|
)
|
||||||
cli_parser.add_argument(
|
cli_parser.add_argument(
|
||||||
|
@ -393,7 +393,7 @@ def floating_checkout_add_origin_if_needed(
|
|||||||
upstream_url = make_utils.git_get_remote_url(args.git_command, "upstream")
|
upstream_url = make_utils.git_get_remote_url(args.git_command, "upstream")
|
||||||
|
|
||||||
call((args.git_command, "remote", "rename", "upstream", "origin"))
|
call((args.git_command, "remote", "rename", "upstream", "origin"))
|
||||||
make_utils.git_set_config(args.git_command, f"remote.origin.url", origin_external_url)
|
make_utils.git_set_config(args.git_command, "remote.origin.url", origin_external_url)
|
||||||
|
|
||||||
call((args.git_command, "remote", "add", "upstream", upstream_url))
|
call((args.git_command, "remote", "add", "upstream", upstream_url))
|
||||||
finally:
|
finally:
|
||||||
|
@ -84,7 +84,7 @@ def _kmi_properties_to_lines_recursive(level, properties, lines):
|
|||||||
lines_test = []
|
lines_test = []
|
||||||
_kmi_properties_to_lines_recursive(level + 2, value, lines_test)
|
_kmi_properties_to_lines_recursive(level + 2, value, lines_test)
|
||||||
if lines_test:
|
if lines_test:
|
||||||
lines.append(f"(")
|
lines.append("(")
|
||||||
lines.append(f"\"{pname}\",\n")
|
lines.append(f"\"{pname}\",\n")
|
||||||
lines.append(f"{indent(level + 3)}" "[")
|
lines.append(f"{indent(level + 3)}" "[")
|
||||||
lines.extend(lines_test)
|
lines.extend(lines_test)
|
||||||
@ -172,19 +172,19 @@ def keyconfig_export_as_data(wm, kc, filepath, *, all_keymaps=False):
|
|||||||
fw("},\n")
|
fw("},\n")
|
||||||
fw(f"{indent(2)}" "{")
|
fw(f"{indent(2)}" "{")
|
||||||
is_modal = km.is_modal
|
is_modal = km.is_modal
|
||||||
fw(f"\"items\":\n")
|
fw("\"items\":\n")
|
||||||
fw(f"{indent(3)}[")
|
fw(f"{indent(3)}[")
|
||||||
for kmi in km.keymap_items:
|
for kmi in km.keymap_items:
|
||||||
if is_modal:
|
if is_modal:
|
||||||
kmi_id = kmi.propvalue
|
kmi_id = kmi.propvalue
|
||||||
else:
|
else:
|
||||||
kmi_id = kmi.idname
|
kmi_id = kmi.idname
|
||||||
fw(f"(")
|
fw("(")
|
||||||
kmi_args = kmi_args_as_data(kmi)
|
kmi_args = kmi_args_as_data(kmi)
|
||||||
kmi_data = _kmi_attrs_or_none(4, kmi)
|
kmi_data = _kmi_attrs_or_none(4, kmi)
|
||||||
fw(f"\"{kmi_id:s}\"")
|
fw(f"\"{kmi_id:s}\"")
|
||||||
if kmi_data is None:
|
if kmi_data is None:
|
||||||
fw(f", ")
|
fw(", ")
|
||||||
else:
|
else:
|
||||||
fw(",\n" f"{indent(5)}")
|
fw(",\n" f"{indent(5)}")
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ def write_mappings(inv, output):
|
|||||||
fw = file.write
|
fw = file.write
|
||||||
year = datetime.date.today().year
|
year = datetime.date.today().year
|
||||||
|
|
||||||
fw(f"# SPDX-FileCopyrightText: 2019-%d Blender Authors\n" % (year))
|
fw("# SPDX-FileCopyrightText: 2019-%d Blender Authors\n" % year)
|
||||||
fw("#\n")
|
fw("#\n")
|
||||||
fw("# SPDX-License-Identifier: GPL-2.0-or-later\n")
|
fw("# SPDX-License-Identifier: GPL-2.0-or-later\n")
|
||||||
fw("\n")
|
fw("\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user