From 5fc7e15f965e7a87770ab07ead6a23a3665cd5d8 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Wed, 3 Dec 2025 14:37:33 +0100 Subject: [PATCH] Fix type annotation for resource_type mypy complains: ``` ubuntutools/lp/lpapicache.py:143: error: Incompatible types in assignment (expression has type "None", variable has type "str") [assignment] ubuntutools/lp/lpapicache.py:1328: error: Incompatible types in assignment (expression has type "tuple[str, str]", base class "BaseWrapper" defined the type as "str") [assignment] ``` --- ubuntutools/lp/lpapicache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntutools/lp/lpapicache.py b/ubuntutools/lp/lpapicache.py index 67a15e9..82baeb7 100644 --- a/ubuntutools/lp/lpapicache.py +++ b/ubuntutools/lp/lpapicache.py @@ -140,7 +140,7 @@ class BaseWrapper(metaclass=MetaWrapper): A base class from which other wrapper classes are derived. """ - resource_type: str = None # it's a base class after all + resource_type: str | tuple[str, str] = "" # it's a base class after all def __new__(cls, data): if isinstance(data, str) and data.startswith(str(Launchpad._root_uri)):