# 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
$ 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)"
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.
# You should have received a copy of the GNU General Public License along with
# Bugs Everywhere. If not, see <http://www.gnu.org/licenses/>.
-"""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
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():
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`.
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
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.
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))