aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/item_infos.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-17 13:50:34 +0200
committerWojtek Kosior <koszko@koszko.org>2022-08-17 13:50:34 +0200
commitc287cc01cf26eb9af1d34b03d0b57716d9976da4 (patch)
treec3d16d6c72ccf55d0dbbc239a88fa28c30ec7d0a /src/hydrilla/item_infos.py
parent2c98d04e4d4a344dc04a481b039a235678f7848e (diff)
downloadhaketilo-hydrilla-c287cc01cf26eb9af1d34b03d0b57716d9976da4.tar.gz
haketilo-hydrilla-c287cc01cf26eb9af1d34b03d0b57716d9976da4.zip
allow loading packages from zip files through web UI and listing installed mappings
Diffstat (limited to 'src/hydrilla/item_infos.py')
-rw-r--r--src/hydrilla/item_infos.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/hydrilla/item_infos.py b/src/hydrilla/item_infos.py
index 0bdc95e..a26e57a 100644
--- a/src/hydrilla/item_infos.py
+++ b/src/hydrilla/item_infos.py
@@ -185,10 +185,10 @@ class ItemInfoBase(ABC, ItemIdentity, Categorizable):
# identifier = self.identifier
# )
- # @property
- # def versioned_identifier(self):
- # """...."""
- # return f'{self.identifier}-{versions.version_string(self.version)}'
+ @property
+ def versioned_identifier(self):
+ """...."""
+ return f'{self.identifier}-{versions.version_string(self.version)}'
@staticmethod
def _get_base_init_kwargs(
@@ -358,10 +358,19 @@ class MappingInfo(ItemInfoBase):
repo_iteration
)
- # def __lt__(self, other: 'MappingInfo') -> bool:
- # """...."""
- # return (self.identifier, self.version, self.repository) < \
- # (other.identifier, other.version, other.repository)
+ def __lt__(self, other: 'MappingInfo') -> bool:
+ """...."""
+ return (
+ self.identifier,
+ other.version,
+ self.repo,
+ other.repo_iteration
+ ) < (
+ other.identifier,
+ self.version,
+ other.repo,
+ self.repo_iteration
+ )
AnyInfo = t.Union[ResourceInfo, MappingInfo]