``from_storage==True``, they are loaded from the bug database.
``content_type`` decides if the body should be run through
:py:func:`util.id.short_to_long_text` before saving. See
- :meth:`_set_comment_body` for details.
+ :py:meth:`_set_comment_body` for details.
``in_reply_to`` should be the uuid string of the parent comment.
"""
Notes
-----
Sometimes the storage will keep track of the user ID (e.g. most
- VCSs, see :meth:`libbe.storage.vcs.base.VCS.get_user_id`). If so,
+ VCSs, see :py:meth:`libbe.storage.vcs.base.VCS.get_user_id`). If so,
we prefer that ID to the fallback, since the user has likely
configured it directly.
"""
don't have to fetch all the ids in the storage repository but
can restrict yourself to a specific branch.
- You can generate ids of this sort with the :meth:`user` method,
+ You can generate ids of this sort with the :py:meth:`user` method,
although in order to preform the truncation, your object (and its
parents must define a `sibling_uuids` method.
While users can use the convenient short user ids in the short
term, the truncation will inevitably lead to name collision. To
avoid that, we provide a non-truncated form of the short user ids
- via the :meth:`long_user` method. These long user ids should be
+ via the :py:meth:`long_user` method. These long user ids should be
converted to short user ids by intelligent user interfaces.
See Also
def child_uuids(child_storage_ids):
"""Extract uuid children from other children generated by
- :meth:`ID.storage`.
+ :py:meth:`ID.storage`.
This is useful for separating data belonging to a particular
object directly from entries for its child objects. Since the
def sort(self, *args, **kwargs):
"""Sort the tree recursively.
- This method extends :meth:`list.sort` to Trees.
+ This method extends :py:meth:`list.sort` to Trees.
Notes
-----
- This method can be slow, e.g. on a :meth:`branch_len` sort,
+ This method can be slow, e.g. on a :py:meth:`branch_len` sort,
since a node at depth `N` from the root has it's
- :meth:`branch_len` method called `N` times.
+ :py:meth:`branch_len` method called `N` times.
"""
list.sort(self, *args, **kwargs)
for child in self:
Depth first by default, but you can set `depth_first` to
`False` for breadth first ordering. Siblings are returned
in the order they are stored, so you might want to
- :meth:`sort` your tree first.
+ :py:meth:`sort` your tree first.
"""
if depth_first == True:
yield self
a-+-c and a-+
+-d-e-f +-d-e-f
- would both produce (after sorting by :meth:`branch_len`)::
+ would both produce (after sorting by :py:meth:`branch_len`)::
(0, a)
(1, b)
class Dir (object):
"""A temporary directory for testing use.
- Make sure you run :meth:`cleanup` after you're done using the
+ Make sure you run :py:meth:`cleanup` after you're done using the
directory.
"""
def __init__(self):