def getter(self): if on_rtd: if version_d: return version_d[sorted(version_d.keys(), key=Version)[-1]] else: raise Exception("Nothing to pick from") else: return _version_pick(version_d)
def __get__(self, obj, cls): # TODO: remove the need to trigger for classes # so we can use the class level for documentation of version picks from utils.version import Version, pick as _version_pick if on_rtd: if self.version_pick: latest = max(self.version_pick, key=Version) return self.version_pick[latest] else: raise LookupError("Nothing to pick from") else: return _version_pick(self.version_pick)
def getter(self): return _version_pick(version_d)