mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[api] improvement: SoftwarePackage.get_supported_actions can now return any iterable
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import List, Set, Optional
|
||||
from typing import List, Set, Optional, Iterable
|
||||
|
||||
from bauh.api.abstract.model import SoftwarePackage, CustomSoftwareAction
|
||||
from bauh.commons import resource
|
||||
@@ -200,7 +200,7 @@ class ArchPackage(SoftwarePackage):
|
||||
def get_cached_pkgbuild_path(self) -> str:
|
||||
return '{}/PKGBUILD'.format(self.get_disk_cache_path())
|
||||
|
||||
def get_custom_supported_actions(self) -> List[CustomSoftwareAction]:
|
||||
def get_custom_actions(self) -> Optional[Iterable[CustomSoftwareAction]]:
|
||||
if self.installed and self.repository == 'aur':
|
||||
actions = [ACTION_AUR_REINSTALL]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user