Ask Solem 11 vuotta sitten
vanhempi
commit
1f9e8b11c4
4 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 1 1
      celery/bin/base.py
  2. 2 2
      celery/utils/debug.py
  3. 1 1
      celery/utils/iso8601.py
  4. 2 2
      celery/utils/timeutils.py

+ 1 - 1
celery/bin/base.py

@@ -323,7 +323,7 @@ class Command(object):
         return value
 
     def handle_argv(self, prog_name, argv, command=None):
-        """Parses command-line arguments from ``argv`` and dispatches
+        """Parse command-line arguments from ``argv`` and dispatch
         to :meth:`run`.
 
         :param prog_name: The program name (``argv[0]``).

+ 2 - 2
celery/utils/debug.py

@@ -125,7 +125,7 @@ def sample(x, n, k=0):
 
 
 def hfloat(f, p=5):
-    """Converts float to value suitable for humans.
+    """Convert float to value suitable for humans.
 
     :keyword p: Float precision.
 
@@ -135,7 +135,7 @@ def hfloat(f, p=5):
 
 
 def humanbytes(s):
-    """Converts bytes to human-readable form (e.g. kB, MB)."""
+    """Convert bytes to human-readable form (e.g. kB, MB)."""
     return next(
         '{0}{1}'.format(hfloat(s / div if div else s), unit)
         for div, unit in UNITS if s >= div

+ 1 - 1
celery/utils/iso8601.py

@@ -53,7 +53,7 @@ TIMEZONE_REGEX = re.compile(
 
 
 def parse_iso8601(datestring):
-    """Parses ISO 8601 dates into datetime objects"""
+    """Parse and convert ISO 8601 string into a datetime object"""
     m = ISO8601_REGEX.match(datestring)
     if not m:
         raise ValueError('unable to parse date string %r' % datestring)

+ 2 - 2
celery/utils/timeutils.py

@@ -187,8 +187,8 @@ def remaining(start, ends_in, now=None, relative=False):
 
 
 def rate(rate):
-    """Parses rate strings, such as `"100/m"`, `"2/h"` or `"0.5/s"`
-    and converts them to seconds."""
+    """Parse rate strings, such as `"100/m"`, `"2/h"` or `"0.5/s"`
+    and convert them to seconds."""
     if rate:
         if isinstance(rate, string_t):
             ops, _, modifier = rate.partition('/')