[view] improvement: displaying a tooltip with the missing dependencies for a supported packaging technology

This commit is contained in:
Vinicius Moreira
2021-11-22 15:48:48 -03:00
parent 5121bb40ef
commit c80845cde4
47 changed files with 525 additions and 47 deletions

View File

@@ -4,7 +4,7 @@ import shutil
from abc import ABC, abstractmethod
from enum import Enum
from pathlib import Path
from typing import List, Set, Type, Tuple, Optional
from typing import List, Set, Type, Tuple, Optional, Generator
import yaml
@@ -243,9 +243,9 @@ class SoftwareManager(ABC):
pass
@abstractmethod
def can_work(self) -> bool:
def can_work(self) -> Tuple[bool, Optional[str]]:
"""
:return: if the instance can work based on what is installed in the user's machine.
:return: if the instance can work based on what is installed in the user's machine. If not, an optional string as a reason.
"""
def cache_to_disk(self, pkg: SoftwarePackage, icon_bytes: Optional[bytes], only_icon: bool):