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]
```
This commit is contained in:
Benjamin Drung 2025-12-03 14:37:33 +01:00
parent f0326592bd
commit 5fc7e15f96

View File

@ -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)):