diff --git a/aqt/installer.py b/aqt/installer.py index 5d8efdd6..bfd09a64 100644 --- a/aqt/installer.py +++ b/aqt/installer.py @@ -749,7 +749,9 @@ def _set_install_qt_parser(self, install_qt_parser, *, is_legacy: bool): def _set_install_tool_parser(self, install_tool_parser, *, is_legacy: bool): install_tool_parser.set_defaults(func=self.run_install_tool, is_legacy=is_legacy) - install_tool_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") + install_tool_parser.add_argument( + "host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name" + ) if not is_legacy: install_tool_parser.add_argument( "target", @@ -806,7 +808,9 @@ def make_parser_sde(cmd: str, desc: str, is_legacy: bool, action, is_add_kde: bo def make_parser_list_sde(cmd: str, desc: str, cmd_type: str): parser = subparsers.add_parser(cmd, description=desc) - parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") + parser.add_argument( + "host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name" + ) parser.add_argument( "qt_version_spec", metavar="(VERSION | SPECIFICATION)", @@ -854,7 +858,9 @@ def _make_list_qt_parser(self, subparsers: argparse._SubParsersAction): "$ aqt list-qt mac desktop --archives 5.9.0 clang_64 # list archives in base Qt installation\n" "$ aqt list-qt mac desktop --archives 5.14.0 clang_64 debug_info # list archives in debug_info module\n", ) - list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") + list_parser.add_argument( + "host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name" + ) list_parser.add_argument( "target", nargs="?", @@ -938,7 +944,9 @@ def _make_list_tool_parser(self, subparsers: argparse._SubParsersAction): "$ aqt list-tool mac desktop tools_ifw --long # print tool variant names with metadata for QtIFW\n" "$ aqt list-tool mac desktop ifw --long # print tool variant names with metadata for QtIFW\n", ) - list_parser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") + list_parser.add_argument( + "host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name" + ) list_parser.add_argument( "target", nargs="?", @@ -1025,7 +1033,9 @@ def _set_common_arguments(self, subparser, *, is_legacy: bool, is_target_depreca """ if is_legacy: subparser.add_argument("qt_version", help='Qt version in the format of "5.X.Y"') - subparser.add_argument("host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name") + subparser.add_argument( + "host", choices=["linux", "linux_arm64", "mac", "windows", "windows_arm64"], help="host os name" + ) if is_target_deprecated: subparser.add_argument( "target", diff --git a/aqt/metadata.py b/aqt/metadata.py index 391c8882..2d488ccb 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -234,7 +234,11 @@ def is_tools(self) -> bool: def to_url(self) -> str: return "online/qtsdkrepository/{os}{arch}/{target}/".format( os=self.host, - arch=("_x86" if self.host == "windows" else ("" if self.host in ("linux_arm64", "all_os", "windows_arm64") else "_x64")), + arch=( + "_x86" + if self.host == "windows" + else ("" if self.host in ("linux_arm64", "all_os", "windows_arm64") else "_x64") + ), target=self.target, )