示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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)
示例#5
0
 def getter(self):
     return _version_pick(version_d)
示例#6
0
 def getter(self):
     return _version_pick(version_d)