From 39b38b0cfc81d352c60c44efeb890b10c3e1bc88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Mon, 27 Jun 2022 23:33:10 +0200 Subject: build: fix readability details Removing some leftover common anti-patterns: - remove unnecessary dict() usage - remove unnecessary map() - avoid index-based loops - use capitalize() instead of index-based capitalization - use f-strings for concatenation Pick-to: 6.2 6.3 Change-Id: I0ffdf73ec47c6ef537789015052dea0fd047350d Reviewed-by: Friedemann Kleint --- build_scripts/platforms/macos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build_scripts/platforms/macos.py') diff --git a/build_scripts/platforms/macos.py b/build_scripts/platforms/macos.py index d7bcd5e0f..6b8d5e1f8 100644 --- a/build_scripts/platforms/macos.py +++ b/build_scripts/platforms/macos.py @@ -12,7 +12,7 @@ from ..versions import PYSIDE def _macos_patch_executable(name, _vars=None): """ Patch an executable to run with the Qt libraries. """ - upper_name = name[0:1].upper() + name[1:] + upper_name = name.capitalize() bundle = f"{{st_build_dir}}/{{st_package_name}}/{upper_name}.app".format(**_vars) binary = f"{bundle}/Contents/MacOS/{upper_name}" rpath = "@loader_path/../../../Qt/lib" @@ -30,7 +30,7 @@ def prepare_standalone_package_macos(self, _vars): if config.is_internal_shiboken_generator_build(): constrain_modules = ["Core", "Network", "Xml", "XmlPatterns"] - constrain_frameworks = ['Qt' + name + '.framework' for name in constrain_modules] + constrain_frameworks = [f"Qt{name}.framework" for name in constrain_modules] copy_plugins = False copy_qml = False copy_translations = False -- cgit v1.2.3