From: W. Trevor King Date: Fri, 26 Oct 2012 12:41:21 +0000 (-0400) Subject: doc: update :meth: to :py:meth: for modern Sphinx. X-Git-Tag: 1.1.0~46 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3354bfda0d54f860f7c83db76dd32e395cd5d1ee;p=be.git doc: update :meth: to :py:meth: for modern Sphinx. --- diff --git a/libbe/comment.py b/libbe/comment.py index 52c3250..2cbbb2c 100644 --- a/libbe/comment.py +++ b/libbe/comment.py @@ -200,7 +200,7 @@ class Comment (Tree, settings_object.SavedSettingsObject): ``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. """ diff --git a/libbe/ui/util/user.py b/libbe/ui/util/user.py index 386c187..8b0f3e0 100644 --- a/libbe/ui/util/user.py +++ b/libbe/ui/util/user.py @@ -134,7 +134,7 @@ def get_user_id(storage=None): 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. """ diff --git a/libbe/util/id.py b/libbe/util/id.py index 8c34303..8605d09 100644 --- a/libbe/util/id.py +++ b/libbe/util/id.py @@ -332,14 +332,14 @@ class ID (object): 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 @@ -385,7 +385,7 @@ class ID (object): 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 diff --git a/libbe/util/tree.py b/libbe/util/tree.py index affdb85..c6aa46b 100644 --- a/libbe/util/tree.py +++ b/libbe/util/tree.py @@ -149,13 +149,13 @@ class Tree(list): 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: @@ -170,7 +170,7 @@ class Tree(list): 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 @@ -202,7 +202,7 @@ class Tree(list): 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) diff --git a/libbe/util/utility.py b/libbe/util/utility.py index b259768..99d28e5 100644 --- a/libbe/util/utility.py +++ b/libbe/util/utility.py @@ -89,7 +89,7 @@ def search_parent_directories(path, filename): 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):