From 26aadf775cbafd14e98870f818aae078181080d8 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 26 Oct 2012 08:12:08 -0400 Subject: [PATCH] doc: update :func: to :py:func: for modern Sphinx. --- doc/conf.py | 2 +- doc/hacking.txt | 2 +- libbe/comment.py | 2 +- libbe/storage/util/config.py | 4 ++-- libbe/ui/util/user.py | 2 +- libbe/util/utility.py | 10 +++++----- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index a115ce4..8b3fcfa 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -75,7 +75,7 @@ exclude_trees = ['.build'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None -# If true, '()' will be appended to :func: etc. cross-reference text. +# If true, '()' will be appended to :py:func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description diff --git a/doc/hacking.txt b/doc/hacking.txt index 941dfde..2684597 100644 --- a/doc/hacking.txt +++ b/doc/hacking.txt @@ -72,7 +72,7 @@ execution + childrens' times):: $ python -c "import pstats; p=pstats.Stats('profile'); p.sort_stats('cumulative').print_stats(20)" If you want to find out who's calling your expensive function -(e.g. :func:`libbe.util.subproc.invoke`), try:: +(e.g. :py:func:`libbe.util.subproc.invoke`), try:: $ python -c "import pstats; p=pstats.Stats('profile'); p.sort_stats('cumulative').print_callers(20)" diff --git a/libbe/comment.py b/libbe/comment.py index c1813b4..cdcb694 100644 --- a/libbe/comment.py +++ b/libbe/comment.py @@ -199,7 +199,7 @@ class Comment (Tree, settings_object.SavedSettingsObject): if ``from_storage==False`` (the default). When ``from_storage==True``, they are loaded from the bug database. ``content_type`` decides if the body should be run through - :func:`util.id.short_to_long_text` before saving. See + :py:func:`util.id.short_to_long_text` before saving. See :meth:`_set_comment_body` for details. ``in_reply_to`` should be the uuid string of the parent comment. diff --git a/libbe/storage/util/config.py b/libbe/storage/util/config.py index 7f1e33c..7e14b5d 100644 --- a/libbe/storage/util/config.py +++ b/libbe/storage/util/config.py @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License along with # Bugs Everywhere. If not, see . -"""Create, save, and load the per-user config file at :func:`path`. +"""Create, save, and load the per-user config file at :py:func:`path`. """ import ConfigParser @@ -35,7 +35,7 @@ if libbe.TESTING == True: default_encoding = libbe.util.encoding.get_text_file_encoding() """Default filesystem encoding. -Initialized with :func:`libbe.util.encoding.get_text_file_encoding`. +Initialized with :py:func:`libbe.util.encoding.get_text_file_encoding`. """ def path(): diff --git a/libbe/ui/util/user.py b/libbe/ui/util/user.py index edd8501..63d7d7f 100644 --- a/libbe/ui/util/user.py +++ b/libbe/ui/util/user.py @@ -127,7 +127,7 @@ def get_user_id(storage=None): 1. Global BE configuration [#]_ (default section, setting 'user'). 2. `storage.get_user_id`, if that function is defined. - 3. :func:`get_fallback_username` and :func:`get_fallback_email`. + 3. :py:func:`get_fallback_username` and :py:func:`get_fallback_email`. .. [#] See :mod:`libbe.storage.util.config`. diff --git a/libbe/util/utility.py b/libbe/util/utility.py index e68d46b..ecebfb0 100644 --- a/libbe/util/utility.py +++ b/libbe/util/utility.py @@ -103,8 +103,8 @@ class Dir (object): return self.path RFC_2822_TIME_FMT = "%a, %d %b %Y %H:%M:%S +0000" -"""RFC 2822 [#]_ format string for :func:`time.strftime` and -:func:`time.strptime`. +"""RFC 2822 [#]_ format string for :py:func:`time.strftime` and +:py:func:`time.strptime`. .. [#] See `RFC 2822`_, sections 3.3 and A.1.1. .. _RFC 2822: http://www.faqs.org/rfcs/rfc2822.html @@ -116,7 +116,7 @@ def time_to_str(time_val): Parameters ---------- time_val : float - Float seconds since the Epoc, see :func:`time.time`. + Float seconds since the Epoc, see :py:func:`time.time`. Note that while `time_val` may contain sub-second data, the output string will not. @@ -168,13 +168,13 @@ def str_to_time(str_time): def handy_time(time_val): """Convert a time number into a useful localtime. - Where :func:`time_to_str` returns GMT +0000, `handy_time` returns + Where :py:func:`time_to_str` returns GMT +0000, `handy_time` returns a string in local time. This may be more accessible for the user. Parameters ---------- time_val : float - Float seconds since the Epoc, see :func:`time.time`. + Float seconds since the Epoc, see :py:func:`time.time`. """ return time.strftime("%a, %d %b %Y %H:%M", time.localtime(time_val)) -- 2.26.2