From babbb240f7f0f0d868d6305001e01a61fe7495f1 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 15 Oct 2015 16:10:20 +0200 Subject: [PATCH] Fix usage of "deprecated" markup in docstrings Replace ".. deprecated:: > 1.5.0" with ".. deprecated:: 1.5.0". Old HTML output: Deprecated since version >: 1.5.0 (...) The new HTML output: Deprecated since version 1.5.0: (...) Fix also reStructured Text formatting in parse_isotime() docstring. Change-Id: If8405ff55973056f56f60c4e27e944e7f0e00045 --- oslo_utils/timeutils.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/oslo_utils/timeutils.py b/oslo_utils/timeutils.py index 2420428a..2f032599 100644 --- a/oslo_utils/timeutils.py +++ b/oslo_utils/timeutils.py @@ -45,7 +45,7 @@ _MAX_DATETIME_SEC = 59 def isotime(at=None, subsecond=False): """Stringify time in ISO 8601 format. - .. deprecated:: > 1.5.0 + .. deprecated:: 1.5.0 Use :func:`utcnow` and :func:`datetime.datetime.isoformat` instead. """ if not at: @@ -77,14 +77,14 @@ def parse_isotime(timestr): def strtime(at=None, fmt=PERFECT_TIME_FORMAT): """Returns formatted utcnow. - .. deprecated:: > 1.5.0 + .. deprecated:: 1.5.0 Use :func:`utcnow()`, :func:`datetime.datetime.isoformat` - or :func:`datetime.strftime` instead. + or :func:`datetime.strftime` instead: - strtime() => utcnow().isoformat() - strtime(fmt=...) => utcnow().strftime(fmt) - strtime(at) => at.isoformat() - strtime(at, fmt) => at.strftime(fmt) + * ``strtime()`` => ``utcnow().isoformat()`` + * ``strtime(fmt=...)`` => ``utcnow().strftime(fmt)`` + * ``strtime(at)`` => ``at.isoformat()`` + * ``strtime(at, fmt)`` => ``at.strftime(fmt)`` """ if not at: at = utcnow() @@ -171,7 +171,7 @@ def utcnow(with_timezone=False): def iso8601_from_timestamp(timestamp, microsecond=False): """Returns an iso8601 formatted date from timestamp. - .. deprecated:: > 1.5.0 + .. deprecated:: 1.5.0 Use :func:`datetime.datetime.utcfromtimestamp` and :func:`datetime.datetime.isoformat` instead. """