Skip to content

Commit

Permalink
style: apply black
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Jun 20, 2024
1 parent 4a1aba9 commit 7ad738b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
20 changes: 15 additions & 5 deletions aqt/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)",
Expand Down Expand Up @@ -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="?",
Expand Down Expand Up @@ -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="?",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion aqt/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down

0 comments on commit 7ad738b

Please sign in to comment.