diff options
author | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-06-27 23:33:10 +0200 |
---|---|---|
committer | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2022-06-29 11:01:58 +0200 |
commit | 39b38b0cfc81d352c60c44efeb890b10c3e1bc88 (patch) | |
tree | a7777082b293a490f73fd49f72820b1dd3fda4a9 /build_scripts/platforms/macos.py | |
parent | eba195611ac30fd490e87a03238060eca05f2073 (diff) |
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 <Friedemann.Kleint@qt.io>
Diffstat (limited to 'build_scripts/platforms/macos.py')
-rw-r--r-- | build_scripts/platforms/macos.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |