feat: Add some type hints

Add some type hints to satisfy mypy.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
This commit is contained in:
Benjamin Drung 2023-01-31 10:35:22 +01:00
parent 72add78e9d
commit 17bed46ffb
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ class BaseWrapper(object, metaclass=MetaWrapper):
A base class from which other wrapper classes are derived.
"""
resource_type = None # it's a base class after all
resource_type: str = None # it's a base class after all
def __new__(cls, data):
if isinstance(data, str) and data.startswith(str(Launchpad._root_uri)):

View File

@ -52,7 +52,7 @@ UPLOAD_QUEUE_STATUSES = ("New", "Unapproved", "Accepted", "Done", "Rejected")
DOWNLOAD_BLOCKSIZE_DEFAULT = 8192
_SYSTEM_DISTRIBUTION_CHAIN = []
_SYSTEM_DISTRIBUTION_CHAIN: list[str] = []
class DownloadError(Exception):