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/unix.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build_scripts/platforms/unix.py') diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py index f345332e0..f109732e3 100644 --- a/build_scripts/platforms/unix.py +++ b/build_scripts/platforms/unix.py @@ -16,7 +16,7 @@ from .macos import prepare_standalone_package_macos def _macos_copy_gui_executable(name, _vars=None): """macOS helper: Copy a GUI executable from the .app folder and return the files""" - app_name = name[:1].upper() + name[1:] + '.app' + app_name = f"{name.capitalize()}.app" return copydir(f"{{install_dir}}/bin/{app_name}", f"{{st_build_dir}}/{{st_package_name}}/{app_name}", _filter=None, recursive=True, @@ -56,9 +56,9 @@ def prepare_packages_posix(self, _vars): def adjusted_lib_name(name, version): postfix = '' if sys.platform.startswith('linux'): - postfix = '.so.' + version + postfix = f".so.{version}" elif sys.platform == 'darwin': - postfix = '.' + version + '.dylib' + postfix = f".{version}.dylib" return name + postfix if config.is_internal_shiboken_module_build(): -- cgit v1.2.3