mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-12-11 01:53:31 +00:00
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:
parent
f0326592bd
commit
5fc7e15f96
@ -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)):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user