Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/loader.py
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | class BasePackageInfo: | ||||
Returns: | Returns: | ||||
The identity for that dict entry | The identity for that dict entry | ||||
""" | """ | ||||
url = attr.ib(type=str) | url = attr.ib(type=str) | ||||
filename = attr.ib(type=Optional[str]) | filename = attr.ib(type=Optional[str]) | ||||
raw = attr.ib(type=Any) | |||||
@property | @property | ||||
def ID_KEYS(self): | def ID_KEYS(self): | ||||
raise NotImplementedError(f"{self.__class__.__name__} is missing ID_KEYS") | raise NotImplementedError(f"{self.__class__.__name__} is missing ID_KEYS") | ||||
def artifact_identity(self): | def artifact_identity(self): | ||||
return [getattr(self, k) for k in self.ID_KEYS] | return [getattr(self, k) for k in self.ID_KEYS] | ||||
▲ Show 20 Lines • Show All 444 Lines • Show Last 20 Lines |