Browse Source

Fixed rst issues

Ask Solem 15 years ago
parent
commit
9f05490f37
2 changed files with 3 additions and 14 deletions
  1. 1 0
      Changelog
  2. 2 14
      celery/utils/timeutils.py

+ 1 - 0
Changelog

@@ -212,6 +212,7 @@ Backward incompatible changes
     Your best choice is to upgrade to Python 2.6,
     Your best choice is to upgrade to Python 2.6,
     as while the pure pickle version has worse performance,
     as while the pure pickle version has worse performance,
     it is the only safe option for older Python versions.
     it is the only safe option for older Python versions.
+
 .. _120news:
 .. _120news:
 
 
 News
 News

+ 2 - 14
celery/utils/timeutils.py

@@ -56,20 +56,6 @@ def remaining(start, ends_in, now=None, relative=True):
           of ``ends_in``).
           of ``ends_in``).
     :keyword now: The current time, defaults to :func:`datetime.now`.
     :keyword now: The current time, defaults to :func:`datetime.now`.
 
 
-    Examples::
-
-        >>> remaining(datetime.now(), ends_in=timedelta(seconds=30))
-        '0:0:29.999948'
-
-        >>> str(remaining(datetime.now() - timedelta(minutes=29),
-                ends_in=timedelta(hours=2)))
-        '1:30:59.999938'
-
-        >>> str(remaining(datetime.now() - timedelta(minutes=29),
-                ends_in=timedelta(hours=2),
-                relative=False))
-        '1:11:18.458437'
-
     """
     """
     now = now or datetime.now()
     now = now or datetime.now()
 
 
@@ -93,6 +79,8 @@ def rate(rate):
 def weekday(name):
 def weekday(name):
     """Return the position of a weekday (0 - 7, where 0 is Sunday).
     """Return the position of a weekday (0 - 7, where 0 is Sunday).
 
 
+    Example::
+
         >>> weekday("sunday"), weekday("sun"), weekday("mon")
         >>> weekday("sunday"), weekday("sun"), weekday("mon")
         (0, 0, 1)
         (0, 0, 1)