aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bug.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/bug.py')
-rw-r--r--libbe/bug.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/libbe/bug.py b/libbe/bug.py
index a4b569f..dd68518 100644
--- a/libbe/bug.py
+++ b/libbe/bug.py
@@ -16,7 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-"""Define the Bug class for representing bugs.
+"""Define the :class:`Bug` class for representing bugs.
"""
import copy
@@ -122,7 +122,9 @@ load_status(active_status_def, inactive_status_def)
class Bug (settings_object.SavedSettingsObject):
"""A bug (or issue) is a place to store attributes and attach
- comments. In mailing-list terms, a bug is analogous to a thread.
+ :class:`libbe.comment.Comment`\s. In mailing-list terms, a bug is
+ analogous to a thread. Bugs are normally stored in
+ :class:`libbe.bugdir.BugDir`\s.
>>> b = Bug()
>>> print b.status
@@ -716,6 +718,7 @@ def cmp_severity(bug_1, bug_2):
"""
Compare the severity levels of two bugs, with more severe bugs
comparing as less.
+
>>> bugA = Bug()
>>> bugB = Bug()
>>> bugA.severity = bugB.severity = "wishlist"
@@ -734,8 +737,9 @@ def cmp_severity(bug_1, bug_2):
def cmp_status(bug_1, bug_2):
"""
- Compare the status levels of two bugs, with more 'open' bugs
+ Compare the status levels of two bugs, with more "open" bugs
comparing as less.
+
>>> bugA = Bug()
>>> bugB = Bug()
>>> bugA.status = bugB.status = "open"
@@ -755,9 +759,10 @@ def cmp_status(bug_1, bug_2):
def cmp_attr(bug_1, bug_2, attr, invert=False):
"""
- Compare a general attribute between two bugs using the conventional
- comparison rule for that attribute type. If invert == True, sort
- *against* that convention.
+ Compare a general attribute between two bugs using the
+ conventional comparison rule for that attribute type. If
+ ``invert==True``, sort *against* that convention.
+
>>> attr="severity"
>>> bugA = Bug()
>>> bugB = Bug()