diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-08-17 13:50:34 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-09-28 12:54:13 +0200 |
commit | d54a95e0f9c689f2bbaaea90a3a16a855a408823 (patch) | |
tree | 2fcd758c6eaa7bc65a9744969a506c4ed24e0365 /src/hydrilla/item_infos.py | |
parent | 2c98d04e4d4a344dc04a481b039a235678f7848e (diff) | |
download | haketilo-hydrilla-d54a95e0f9c689f2bbaaea90a3a16a855a408823.tar.gz haketilo-hydrilla-d54a95e0f9c689f2bbaaea90a3a16a855a408823.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.py | 25 |
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] |