diff --git a/aqt/archives.py b/aqt/archives.py index 6061a268..82d4aa19 100644 --- a/aqt/archives.py +++ b/aqt/archives.py @@ -173,7 +173,7 @@ def _version_str(self) -> str: class Updates: package_updates: List[PackageUpdate] - def __init__(self): + def __init__(self) -> None: self.package_updates = [] def extend(self, other): diff --git a/aqt/exceptions.py b/aqt/exceptions.py index 972488c0..3b161835 100644 --- a/aqt/exceptions.py +++ b/aqt/exceptions.py @@ -24,7 +24,7 @@ class AqtException(Exception): - def __init__(self, *args, suggested_action: Optional[List[str]] = None, should_show_help: bool = False, **kwargs): + def __init__(self, *args, suggested_action: Optional[List[str]] = None, should_show_help: bool = False, **kwargs) -> None: self.suggested_action: List[str] = suggested_action or [] self.should_show_help: bool = should_show_help or False super(AqtException, self).__init__(*args, **kwargs) @@ -53,7 +53,7 @@ class ArchiveChecksumError(ArchiveDownloadError): class ChecksumDownloadFailure(ArchiveDownloadError): - def __init__(self, *args, suggested_action: Optional[List[str]] = None, **kwargs): + def __init__(self, *args, suggested_action: Optional[List[str]] = None, **kwargs) -> None: if suggested_action is None: suggested_action = [] suggested_action.extend( diff --git a/aqt/helper.py b/aqt/helper.py index 0777fc5f..4cc0149e 100644 --- a/aqt/helper.py +++ b/aqt/helper.py @@ -257,7 +257,7 @@ def altlink(url: str, alt: str) -> str: class MyQueueListener(QueueListener): - def __init__(self, queue): + def __init__(self, queue) -> None: handlers: List[Handler] = [] super().__init__(queue, *handlers) @@ -347,7 +347,7 @@ def __new__(cls, *p, **k): self.__dict__ = cls._shared_state return self - def __init__(self): + def __init__(self) -> None: if self.config is None: with self._lock: if self.config is None: diff --git a/aqt/installer.py b/aqt/installer.py index 806145e4..086d1f00 100644 --- a/aqt/installer.py +++ b/aqt/installer.py @@ -149,7 +149,7 @@ class Cli: UNHANDLED_EXCEPTION_CODE = 254 - def __init__(self): + def __init__(self) -> None: parser = argparse.ArgumentParser( prog="aqt", description="Another unofficial Qt Installer.\naqt helps you install Qt SDK, tools, examples and others\n", diff --git a/aqt/metadata.py b/aqt/metadata.py index 4e7eb87c..4bedbe8e 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -79,7 +79,7 @@ def __init__( prerelease=None, build=None, partial=False, - ): + ) -> None: if version_string is None: super(Version, self).__init__( version_string=None, diff --git a/aqt/updater.py b/aqt/updater.py index b4f953eb..417f2bac 100644 --- a/aqt/updater.py +++ b/aqt/updater.py @@ -47,7 +47,7 @@ def unpatched_paths() -> List[str]: class Updater: - def __init__(self, prefix: Path, logger): + def __init__(self, prefix: Path, logger) -> None: self.logger = logger self.prefix = prefix self.qmake_path: Optional[Path] = None diff --git a/pyproject.toml b/pyproject.toml index 57f323d7..ea467f33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,7 @@ check = [ "pygments", "packaging", "pylint", + "types-requests", ] docs = [ "sphinx>=7.0",