/usr/lib/python3/dist-packages/releases/models.py is in python3-releases 1.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | from docutils import nodes
# Issue type list (keys) + color values
ISSUE_TYPES = {
'bug': 'A04040',
'feature': '40A056',
'support': '4070A0',
}
class Issue(nodes.Element):
@property
def type(self):
return self['type_']
@property
def backported(self):
return self.get('backported', False)
@property
def major(self):
return self.get('major', False)
@property
def number(self):
return self.get('number', None)
@property
def line(self):
return self.get('line', None)
def __repr__(self):
flag = ''
if self.backported:
flag = 'backported'
elif self.major:
flag = 'major'
elif self.line:
flag = self.line + '+'
if flag:
flag = ' ({0})'.format(flag)
return '<{issue.type} #{issue.number}{flag}>'.format(issue=self,
flag=flag)
class Release(nodes.Element):
@property
def number(self):
return self['number']
def __repr__(self):
return '<release {0}>'.format(self.number)
|