Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
Kidev committed Jan 6, 2025
1 parent d01c25a commit 3d0d352
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions aqt/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,14 +1082,13 @@ def _make_list_tool_parser(self, subparsers: argparse._SubParsersAction):
)
list_parser.set_defaults(func=self.run_list_tool)

def _make_common_parsers(self, subparsers: argparse._SubParsersAction):
def _make_common_parsers(self, subparsers: argparse._SubParsersAction) -> None:
help_parser = subparsers.add_parser("help")
help_parser.set_defaults(func=self.show_help)
#
version_parser = subparsers.add_parser("version")
version_parser.set_defaults(func=self.show_aqt_version)

def _set_common_options(self, subparser: argparse._SubParsersAction) -> None:
def _set_common_options(self, subparser: argparse.ArgumentParser) -> None:
subparser.add_argument(
"-O",
"--outputdir",
Expand Down Expand Up @@ -1469,13 +1468,13 @@ class CommercialInstaller:
def __init__(
self,
target: str,
arch: str,
version: str,
arch: Optional[str],
version: Optional[str],
username: Optional[str] = None,
password: Optional[str] = None,
output_dir: Optional[str] = None,
logger: Optional[Logger] = None,
timeout: int = 10,
timeout: Optional[float] = None,
base_url: str = "https://download.qt.io",
operation_does_not_exist_error="Ignore",
overwrite_target_dir: str = "Yes",
Expand All @@ -1486,13 +1485,13 @@ def __init__(
telemetry: str = "No",
):
self.target = target
self.arch = arch
self.version = Version(version)
self.arch = arch or ""
self.version = Version(version) if version else Version()
self.username = username
self.password = password
self.output_dir = output_dir
self.logger = logger or getLogger(__name__)
self.timeout = timeout
self.timeout = int(timeout) if timeout else 5
self.base_url = base_url

self.operation_does_not_exist_error = operation_does_not_exist_error
Expand Down

0 comments on commit 3d0d352

Please sign in to comment.