瀏覽代碼

Two spaces after period for monospaced fonts

Ask Solem 8 年之前
父節點
當前提交
2570e61a26

+ 2 - 3
celery/_state.py

@@ -28,9 +28,8 @@ default_app = None
 #: List of all app instances (weakrefs), mustn't be used directly.
 #: List of all app instances (weakrefs), mustn't be used directly.
 _apps = weakref.WeakSet()
 _apps = weakref.WeakSet()
 
 
-#: global set of functions to call whenever a new app is finalized
-#: E.g. Shared tasks, and built-in tasks are created
-#: by adding callbacks here.
+#: Global set of functions to call whenever a new app is finalized.
+#: Shared tasks, and built-in tasks are created by adding callbacks here.
 _on_app_finalizers = set()
 _on_app_finalizers = set()
 
 
 _task_join_will_block = False
 _task_join_will_block = False

+ 1 - 1
celery/app/base.py

@@ -117,7 +117,7 @@ class Celery(object):
         loader (str, type): The loader class, or the name of the loader
         loader (str, type): The loader class, or the name of the loader
             class to use.  Default is :class:`celery.loaders.app.AppLoader`.
             class to use.  Default is :class:`celery.loaders.app.AppLoader`.
         backend (str, type): The result store backend class, or the name of the
         backend (str, type): The result store backend class, or the name of the
-            backend class to use. Default is the value of the
+            backend class to use.  Default is the value of the
             :setting:`result_backend` setting.
             :setting:`result_backend` setting.
         amqp (str, type): AMQP object or class name.
         amqp (str, type): AMQP object or class name.
         events (str, type): Events object or class name.
         events (str, type): Events object or class name.

+ 5 - 5
celery/app/task.py

@@ -433,7 +433,7 @@ class Task(object):
                 argument.
                 argument.
 
 
             routing_key (str): Custom routing key used to route the task to a
             routing_key (str): Custom routing key used to route the task to a
-                worker server. If in combination with a ``queue`` argument
+                worker server.  If in combination with a ``queue`` argument
                 only used to specify custom routing keys to topic exchanges.
                 only used to specify custom routing keys to topic exchanges.
 
 
             priority (int): The task priority, a number between 0 and 9.
             priority (int): The task priority, a number between 0 and 9.
@@ -448,8 +448,8 @@ class Task(object):
             compression (str): Optional compression method
             compression (str): Optional compression method
                 to use.  Can be one of ``zlib``, ``bzip2``,
                 to use.  Can be one of ``zlib``, ``bzip2``,
                 or any custom compression methods registered with
                 or any custom compression methods registered with
-                :func:`kombu.compression.register`. Defaults to
-                the :setting:`task_compression` setting.
+                :func:`kombu.compression.register`.
+                Defaults to the :setting:`task_compression` setting.
 
 
             link (~@Signature): A single, or a list of tasks signatures
             link (~@Signature): A single, or a list of tasks signatures
                 to apply if the task returns successfully.
                 to apply if the task returns successfully.
@@ -578,8 +578,8 @@ class Task(object):
             eta (~datetime.dateime): Explicit time and date to run the
             eta (~datetime.dateime): Explicit time and date to run the
                 retry at.
                 retry at.
             max_retries (int): If set, overrides the default retry limit for
             max_retries (int): If set, overrides the default retry limit for
-                this execution. Changes to this parameter don't propagate to
-                subsequent task retry attempts. A value of :const:`None`, means
+                this execution.  Changes to this parameter don't propagate to
+                subsequent task retry attempts.  A value of :const:`None`, means
                 "use the default", so if you want infinite retries you'd
                 "use the default", so if you want infinite retries you'd
                 have to set the :attr:`max_retries` attribute of the task to
                 have to set the :attr:`max_retries` attribute of the task to
                 :const:`None` first.
                 :const:`None` first.

+ 11 - 5
celery/backends/base.py

@@ -141,7 +141,7 @@ class Backend(object):
                         traceback=None, request=None,
                         traceback=None, request=None,
                         store_result=True, call_errbacks=True,
                         store_result=True, call_errbacks=True,
                         state=states.FAILURE):
                         state=states.FAILURE):
-        """Mark task as executed with failure. Stores the exception."""
+        """Mark task as executed with failure."""
         if store_result:
         if store_result:
             self.store_result(task_id, exc, state,
             self.store_result(task_id, exc, state,
                               traceback=traceback, request=request)
                               traceback=traceback, request=request)
@@ -179,8 +179,11 @@ class Backend(object):
 
 
     def mark_as_retry(self, task_id, exc, traceback=None,
     def mark_as_retry(self, task_id, exc, traceback=None,
                       request=None, store_result=True, state=states.RETRY):
                       request=None, store_result=True, state=states.RETRY):
-        """Mark task as being retries. Stores the current
-        exception (if any)."""
+        """Mark task as being retries.
+
+        Note:
+            Stores the current exception (if any).
+        """
         return self.store_result(task_id, exc, state,
         return self.store_result(task_id, exc, state,
                                  traceback=traceback, request=request)
                                  traceback=traceback, request=request)
 
 
@@ -364,8 +367,11 @@ class Backend(object):
         return self._delete_group(group_id)
         return self._delete_group(group_id)
 
 
     def cleanup(self):
     def cleanup(self):
-        """Backend cleanup. Is run by
-        :class:`celery.task.DeleteExpiredTaskMetaTask`."""
+        """Backend cleanup.
+
+        Note:
+            This is run by :class:`celery.task.DeleteExpiredTaskMetaTask`.
+        """
         pass
         pass
 
 
     def process_cleanup(self):
     def process_cleanup(self):

+ 2 - 2
celery/backends/cassandra.py

@@ -21,7 +21,7 @@ logger = get_logger(__name__)
 
 
 E_NO_CASSANDRA = """
 E_NO_CASSANDRA = """
 You need to install the cassandra-driver library to
 You need to install the cassandra-driver library to
-use the Cassandra backend. See https://github.com/datastax/python-driver
+use the Cassandra backend.  See https://github.com/datastax/python-driver
 """
 """
 
 
 E_NO_SUCH_CASSANDRA_AUTH_PROVIDER = """
 E_NO_SUCH_CASSANDRA_AUTH_PROVIDER = """
@@ -160,7 +160,7 @@ class CassandraBackend(BaseBackend):
 
 
             if write:
             if write:
                 # Only possible writers "workers" are allowed to issue
                 # Only possible writers "workers" are allowed to issue
-                # CREATE TABLE. This is to prevent conflicting situations
+                # CREATE TABLE.  This is to prevent conflicting situations
                 # where both task-creator and task-executor would issue it
                 # where both task-creator and task-executor would issue it
                 # at the same time.
                 # at the same time.
 
 

+ 1 - 1
celery/backends/database/__init__.py

@@ -53,7 +53,7 @@ def retry(fun):
                 return fun(*args, **kwargs)
                 return fun(*args, **kwargs)
             except (DatabaseError, InvalidRequestError, StaleDataError):
             except (DatabaseError, InvalidRequestError, StaleDataError):
                 logger.warning(
                 logger.warning(
-                    'Failed operation %s. Retrying %s more times.',
+                    'Failed operation %s.  Retrying %s more times.',
                     fun.__name__, max_retries - retries - 1,
                     fun.__name__, max_retries - retries - 1,
                     exc_info=True)
                     exc_info=True)
                 if retries + 1 >= max_retries:
                 if retries + 1 >= max_retries:

+ 3 - 3
celery/backends/mongodb.py

@@ -134,7 +134,7 @@ class MongoBackend(BaseBackend):
             if not host:
             if not host:
                 # The first pymongo.Connection() argument (host) can be
                 # The first pymongo.Connection() argument (host) can be
                 # a list of ['host:port'] elements or a mongodb connection
                 # a list of ['host:port'] elements or a mongodb connection
-                # URI. If this is the case, don't use self.port
+                # URI.  If this is the case, don't use self.port
                 # but let pymongo get the port(s) from the URI instead.
                 # but let pymongo get the port(s) from the URI instead.
                 # This enables the use of replica sets and sharding.
                 # This enables the use of replica sets and sharding.
                 # See pymongo.Connection() for more info.
                 # See pymongo.Connection() for more info.
@@ -268,7 +268,7 @@ class MongoBackend(BaseBackend):
         collection = self.database[self.taskmeta_collection]
         collection = self.database[self.taskmeta_collection]
 
 
         # Ensure an index on date_done is there, if not process the index
         # Ensure an index on date_done is there, if not process the index
-        # in the background. Once completed cleanup will be much faster
+        # in the background.  Once completed cleanup will be much faster
         collection.ensure_index('date_done', background='true')
         collection.ensure_index('date_done', background='true')
         return collection
         return collection
 
 
@@ -278,7 +278,7 @@ class MongoBackend(BaseBackend):
         collection = self.database[self.groupmeta_collection]
         collection = self.database[self.groupmeta_collection]
 
 
         # Ensure an index on date_done is there, if not process the index
         # Ensure an index on date_done is there, if not process the index
-        # in the background. Once completed cleanup will be much faster
+        # in the background.  Once completed cleanup will be much faster
         collection.ensure_index('date_done', background='true')
         collection.ensure_index('date_done', background='true')
         return collection
         return collection
 
 

+ 2 - 2
celery/beat.py

@@ -423,8 +423,8 @@ class PersistentScheduler(Scheduler):
         try:
         try:
             self._store = self._open_schedule()
             self._store = self._open_schedule()
             # In some cases there may be different errors from a storage
             # In some cases there may be different errors from a storage
-            # backend for corrupted files. Example - DBPageNotFoundError
-            # exception from bsddb. In such case the file will be
+            # backend for corrupted files.  Example - DBPageNotFoundError
+            # exception from bsddb.  In such case the file will be
             # successfully opened but the error will be raised on first key
             # successfully opened but the error will be raised on first key
             # retrieving.
             # retrieving.
             self._store.keys()
             self._store.keys()

+ 1 - 1
celery/bin/amqp.py

@@ -190,7 +190,7 @@ class AMQShell(cmd.Cmd):
         self._reconnect()
         self._reconnect()
 
 
     def note(self, m):
     def note(self, m):
-        """Say something to the user. Disabled if :attr:`silent`."""
+        """Say something to the user.  Disabled if :attr:`silent`."""
         if not self.silent:
         if not self.silent:
             say(m, file=self.out)
             say(m, file=self.out)
 
 

+ 2 - 2
celery/bin/beat.py

@@ -13,7 +13,7 @@
 
 
 .. cmdoption:: -s, --schedule
 .. cmdoption:: -s, --schedule
 
 
-    Path to the schedule database. Defaults to `celerybeat-schedule`.
+    Path to the schedule database.  Defaults to `celerybeat-schedule`.
     The extension '.db' may be appended to the filename.
     The extension '.db' may be appended to the filename.
     Default is {default}.
     Default is {default}.
 
 
@@ -28,7 +28,7 @@
 
 
 .. cmdoption:: -f, --logfile
 .. cmdoption:: -f, --logfile
 
 
-    Path to log file. If no logfile is specified, `stderr` is used.
+    Path to log file.  If no logfile is specified, `stderr` is used.
 
 
 .. cmdoption:: -l, --loglevel
 .. cmdoption:: -l, --loglevel
 
 

+ 2 - 2
celery/bin/celery.py

@@ -50,7 +50,7 @@ in any command that also has a `--detach` option.
 
 
 .. cmdoption:: -f, --logfile
 .. cmdoption:: -f, --logfile
 
 
-    Path to log file. If no logfile is specified, `stderr` is used.
+    Path to log file.  If no logfile is specified, `stderr` is used.
 
 
 .. cmdoption:: --pidfile
 .. cmdoption:: --pidfile
 
 
@@ -601,7 +601,7 @@ class _RemoteControl(Command):
     def run(self, *args, **kwargs):
     def run(self, *args, **kwargs):
         if not args:
         if not args:
             raise self.UsageError(
             raise self.UsageError(
-                'Missing {0.name} method. See --help'.format(self))
+                'Missing {0.name} method.  See --help'.format(self))
         return self.do_call_method(args, **kwargs)
         return self.do_call_method(args, **kwargs)
 
 
     def _ensure_fanout_supported(self):
     def _ensure_fanout_supported(self):

+ 1 - 1
celery/bin/events.py

@@ -34,7 +34,7 @@
 
 
 .. cmdoption:: -f, --logfile
 .. cmdoption:: -f, --logfile
 
 
-    Path to log file. If no logfile is specified, `stderr` is used.
+    Path to log file.  If no logfile is specified, `stderr` is used.
 
 
 .. cmdoption:: --pidfile
 .. cmdoption:: --pidfile
 
 

+ 10 - 10
celery/bin/worker.py

@@ -11,7 +11,7 @@ The :program:`celery worker` command (previously known as ``celeryd``)
 
 
 .. cmdoption:: -c, --concurrency
 .. cmdoption:: -c, --concurrency
 
 
-    Number of child processes processing the queue. The default
+    Number of child processes processing the queue.  The default
     is the number of CPUs available on your system.
     is the number of CPUs available on your system.
 
 
 .. cmdoption:: -P, --pool
 .. cmdoption:: -P, --pool
@@ -22,12 +22,12 @@ The :program:`celery worker` command (previously known as ``celeryd``)
 
 
 .. cmdoption:: -n, --hostname
 .. cmdoption:: -n, --hostname
 
 
-    Set custom hostname, e.g. 'w1.%h'. Expands: %h (hostname),
+    Set custom hostname, e.g. 'w1.%h'.  Expands: %h (hostname),
     %n (name) and %d, (domain).
     %n (name) and %d, (domain).
 
 
 .. cmdoption:: -B, --beat
 .. cmdoption:: -B, --beat
 
 
-    Also run the `celery beat` periodic task scheduler. Please note that
+    Also run the `celery beat` periodic task scheduler.  Please note that
     there must only be one instance of this service.
     there must only be one instance of this service.
 
 
 .. cmdoption:: -Q, --queues
 .. cmdoption:: -Q, --queues
@@ -50,7 +50,7 @@ The :program:`celery worker` command (previously known as ``celeryd``)
 .. cmdoption:: -s, --schedule
 .. cmdoption:: -s, --schedule
 
 
     Path to the schedule database if running with the `-B` option.
     Path to the schedule database if running with the `-B` option.
-    Defaults to `celerybeat-schedule`. The extension ".db" may be
+    Defaults to `celerybeat-schedule`.  The extension ".db" may be
     appended to the filename.
     appended to the filename.
 
 
 .. cmdoption:: -O
 .. cmdoption:: -O
@@ -63,13 +63,13 @@ The :program:`celery worker` command (previously known as ``celeryd``)
 
 
 .. cmdoption:: --scheduler
 .. cmdoption:: --scheduler
 
 
-    Scheduler class to use. Default is
+    Scheduler class to use.  Default is
     :class:`celery.beat.PersistentScheduler`
     :class:`celery.beat.PersistentScheduler`
 
 
 .. cmdoption:: -S, --statedb
 .. cmdoption:: -S, --statedb
 
 
-    Path to the state database. The extension '.db' may
-    be appended to the filename. Default: {default}
+    Path to the state database.  The extension '.db' may
+    be appended to the filename.  Default: {default}
 
 
 .. cmdoption:: -E, --events
 .. cmdoption:: -E, --events
 
 
@@ -114,7 +114,7 @@ The :program:`celery worker` command (previously known as ``celeryd``)
 .. cmdoption:: --maxmemperchild
 .. cmdoption:: --maxmemperchild
 
 
     Maximum amount of resident memory, in KiB, that may be consumed by a
     Maximum amount of resident memory, in KiB, that may be consumed by a
-    child process before it will be replaced by a new one. If a single
+    child process before it will be replaced by a new one.  If a single
     task causes a child process to exceed this limit, the task will be
     task causes a child process to exceed this limit, the task will be
     completed and the child process will be replaced afterwards.
     completed and the child process will be replaced afterwards.
     Default: no limit.
     Default: no limit.
@@ -125,7 +125,7 @@ The :program:`celery worker` command (previously known as ``celeryd``)
 
 
 .. cmdoption:: -f, --logfile
 .. cmdoption:: -f, --logfile
 
 
-    Path to log file. If no logfile is specified, `stderr` is used.
+    Path to log file.  If no logfile is specified, `stderr` is used.
 
 
 .. cmdoption:: -l, --loglevel
 .. cmdoption:: -l, --loglevel
 
 
@@ -231,7 +231,7 @@ class worker(Command):
             try:
             try:
                 loglevel = mlevel(loglevel)
                 loglevel = mlevel(loglevel)
             except KeyError:  # pragma: no cover
             except KeyError:  # pragma: no cover
-                self.die('Unknown level {0!r}. Please use one of {1}.'.format(
+                self.die('Unknown level {0!r}.  Please use one of {1}.'.format(
                     loglevel, '|'.join(
                     loglevel, '|'.join(
                         l for l in LOG_LEVELS if isinstance(l, string_t))))
                         l for l in LOG_LEVELS if isinstance(l, string_t))))
 
 

+ 1 - 1
celery/concurrency/prefork.py

@@ -50,7 +50,7 @@ def process_initializer(app, hostname):
     platforms.signals.ignore(*WORKER_SIGIGNORE)
     platforms.signals.ignore(*WORKER_SIGIGNORE)
     platforms.set_mp_process_title('celeryd', hostname=hostname)
     platforms.set_mp_process_title('celeryd', hostname=hostname)
     # This is for Windows and other platforms not supporting
     # This is for Windows and other platforms not supporting
-    # fork(). Note that init_worker makes sure it's only
+    # fork().  Note that init_worker makes sure it's only
     # run once per process.
     # run once per process.
     app.loader.init_worker()
     app.loader.init_worker()
     app.loader.init_worker_process()
     app.loader.init_worker_process()

+ 4 - 4
celery/contrib/abortable.py

@@ -5,7 +5,7 @@ Abortable tasks overview
 =========================
 =========================
 
 
 For long-running :class:`Task`'s, it can be desirable to support
 For long-running :class:`Task`'s, it can be desirable to support
-aborting during execution. Of course, these tasks should be built to
+aborting during execution.  Of course, these tasks should be built to
 support abortion specifically.
 support abortion specifically.
 
 
 The :class:`AbortableTask` serves as a base class for all :class:`Task`
 The :class:`AbortableTask` serves as a base class for all :class:`Task`
@@ -16,7 +16,7 @@ objects that should support abortion by producers.
 
 
 * Consumers (workers) should periodically check (and honor!) the
 * Consumers (workers) should periodically check (and honor!) the
   :meth:`is_aborted` method at controlled points in their task's
   :meth:`is_aborted` method at controlled points in their task's
-  :meth:`run` method. The more often, the better.
+  :meth:`run` method.  The more often, the better.
 
 
 The necessary intermediate communication is dealt with by the
 The necessary intermediate communication is dealt with by the
 :class:`AbortableTask` implementation.
 :class:`AbortableTask` implementation.
@@ -72,8 +72,8 @@ In the producer:
         result.abort()
         result.abort()
 
 
 After the `result.abort()` call, the task execution isn't
 After the `result.abort()` call, the task execution isn't
-aborted immediately. In fact, it's not guaranteed to abort at all. Keep
-checking `result.state` status, or call `result.get(timeout=)` to
+aborted immediately.  In fact, it's not guaranteed to abort at all.
+Keep checking `result.state` status, or call `result.get(timeout=)` to
 have it block until the task is finished.
 have it block until the task is finished.
 
 
 .. note::
 .. note::

+ 1 - 1
celery/contrib/migrate.py

@@ -127,7 +127,7 @@ def move(predicate, connection=None, exchange=None, routing_key=None,
     Arguments:
     Arguments:
         predicate (Callable): Filter function used to decide which messages
         predicate (Callable): Filter function used to decide which messages
             to move.  Must accept the standard signature of ``(body, message)``
             to move.  Must accept the standard signature of ``(body, message)``
-            used by Kombu consumer callbacks. If the predicate wants the
+            used by Kombu consumer callbacks.  If the predicate wants the
             message to be moved it must return either:
             message to be moved it must return either:
 
 
                 1) a tuple of ``(exchange, routing_key)``, or
                 1) a tuple of ``(exchange, routing_key)``, or

+ 2 - 2
celery/events/__init__.py

@@ -85,8 +85,8 @@ class EventDispatcher(object):
 
 
         groups (Sequence[str]): List of groups to send events for.
         groups (Sequence[str]): List of groups to send events for.
             :meth:`send` will ignore send requests to groups not in this list.
             :meth:`send` will ignore send requests to groups not in this list.
-            If this is :const:`None`, all events will be sent. Example groups
-            include ``"task"`` and ``"worker"``.
+            If this is :const:`None`, all events will be sent.
+            Example groups include ``"task"`` and ``"worker"``.
 
 
         enabled (bool): Set to :const:`False` to not actually publish any
         enabled (bool): Set to :const:`False` to not actually publish any
             events, making :meth:`send` a no-op.
             events, making :meth:`send` a no-op.

+ 1 - 1
celery/events/cursesmon.py

@@ -499,7 +499,7 @@ class DisplayThread(threading.Thread):  # pragma: no cover
 def capture_events(app, state, display):  # pragma: no cover
 def capture_events(app, state, display):  # pragma: no cover
 
 
     def on_connection_error(exc, interval):
     def on_connection_error(exc, interval):
-        print('Connection Error: {0!r}. Retry in {1}s.'.format(
+        print('Connection Error: {0!r}.  Retry in {1}s.'.format(
             exc, interval), file=sys.stderr)
             exc, interval), file=sys.stderr)
 
 
     while 1:
     while 1:

+ 1 - 1
celery/events/dumper.py

@@ -2,7 +2,7 @@
 """Utility to dump events to screen.
 """Utility to dump events to screen.
 
 
 This is a simple program that dumps events to the console
 This is a simple program that dumps events to the console
-as they happen. Think of it like a `tcpdump` for Celery events.
+as they happen.  Think of it like a `tcpdump` for Celery events.
 """
 """
 from __future__ import absolute_import, print_function, unicode_literals
 from __future__ import absolute_import, print_function, unicode_literals
 
 

+ 2 - 2
celery/platforms.py

@@ -182,7 +182,7 @@ class Pidfile(object):
         try:
         try:
             pid = self.read_pid()
             pid = self.read_pid()
         except ValueError as exc:
         except ValueError as exc:
-            print('Broken pidfile found. Removing it.', file=sys.stderr)
+            print('Broken pidfile found - Removing it.', file=sys.stderr)
             self.remove()
             self.remove()
             return True
             return True
         if not pid:
         if not pid:
@@ -193,7 +193,7 @@ class Pidfile(object):
             os.kill(pid, 0)
             os.kill(pid, 0)
         except os.error as exc:
         except os.error as exc:
             if exc.errno == errno.ESRCH:
             if exc.errno == errno.ESRCH:
-                print('Stale pidfile exists. Removing it.', file=sys.stderr)
+                print('Stale pidfile exists - Removing it.', file=sys.stderr)
                 self.remove()
                 self.remove()
                 return True
                 return True
         return False
         return False

+ 1 - 1
celery/result.py

@@ -416,7 +416,7 @@ class AsyncResult(ResultBase):
 
 
             *SUCCESS*
             *SUCCESS*
 
 
-                The task executed successfully. The :attr:`result` attribute
+                The task executed successfully.  The :attr:`result` attribute
                 then contains the tasks return value.
                 then contains the tasks return value.
         """
         """
         return self._get_task_meta()['status']
         return self._get_task_meta()['status']

+ 4 - 4
celery/schedules.py

@@ -27,7 +27,7 @@ __all__ = [
 schedstate = namedtuple('schedstate', ('is_due', 'next'))
 schedstate = namedtuple('schedstate', ('is_due', 'next'))
 
 
 CRON_PATTERN_INVALID = """\
 CRON_PATTERN_INVALID = """\
-Invalid crontab pattern. Valid range is {min}-{max}. \
+Invalid crontab pattern.  Valid range is {min}-{max}. \
 '{value}' was found.\
 '{value}' was found.\
 """
 """
 
 
@@ -174,7 +174,7 @@ class schedule(object):
 
 
 
 
 class crontab_parser(object):
 class crontab_parser(object):
-    """Parser for Crontab expressions. Any expression of the form 'groups'
+    """Parser for Crontab expressions.  Any expression of the form 'groups'
     (see BNF grammar below) is accepted and expanded to a set of numbers.
     (see BNF grammar below) is accepted and expanded to a set of numbers.
     These numbers represent the units of time that the Crontab needs to
     These numbers represent the units of time that the Crontab needs to
     run on:
     run on:
@@ -300,7 +300,7 @@ class crontab(schedule):
     periodic task entry to add :manpage:`crontab(5)`-like scheduling.
     periodic task entry to add :manpage:`crontab(5)`-like scheduling.
 
 
     Like a :manpage:`cron(5)`-job, you can specify units of time of when
     Like a :manpage:`cron(5)`-job, you can specify units of time of when
-    you'd like the task to execute. It's a reasonably complete
+    you'd like the task to execute.  It's a reasonably complete
     implementation of :command:`cron`'s features, so it should provide a fair
     implementation of :command:`cron`'s features, so it should provide a fair
     degree of scheduling needs.
     degree of scheduling needs.
 
 
@@ -740,7 +740,7 @@ class solar(schedule):
                 start=last_run_at_utc, use_center=self.use_center,
                 start=last_run_at_utc, use_center=self.use_center,
             )
             )
         except self.ephem.CircumpolarError:  # pragma: no cover
         except self.ephem.CircumpolarError:  # pragma: no cover
-            # Sun won't rise/set today. Check again tomorrow
+            # Sun won't rise/set today.  Check again tomorrow
             # (specifically, after the next anti-transit).
             # (specifically, after the next anti-transit).
             next_utc = (
             next_utc = (
                 self.cal.next_antitransit(self.ephem.Sun()) +
                 self.cal.next_antitransit(self.ephem.Sun()) +

+ 2 - 2
celery/utils/collections.py

@@ -495,7 +495,7 @@ class LimitedSet(object):
             raise ValueError('expires cannot be negative!')
             raise ValueError('expires cannot be negative!')
 
 
     def _refresh_heap(self):
     def _refresh_heap(self):
-        """Time consuming recreating of heap. Don't run this too often."""
+        """Time consuming recreating of heap.  Don't run this too often."""
         self._heap[:] = [entry for entry in values(self._data)]
         self._heap[:] = [entry for entry in values(self._data)]
         heapify(self._heap)
         heapify(self._heap)
 
 
@@ -546,7 +546,7 @@ class LimitedSet(object):
                 self.add(obj)
                 self.add(obj)
 
 
     def discard(self, item):
     def discard(self, item):
-        # mark an existing item as removed. If KeyError is not found, pass.
+        # mark an existing item as removed.  If KeyError is not found, pass.
         self._data.pop(item, None)
         self._data.pop(item, None)
         self._maybe_refresh_heap()
         self._maybe_refresh_heap()
     pop_value = discard
     pop_value = discard

+ 4 - 4
celery/utils/dispatch/saferef.py

@@ -76,7 +76,7 @@ class BoundMethodWeakref(object):  # pragma: no cover
             class attribute pointing to all live
             class attribute pointing to all live
             BoundMethodWeakref objects indexed by the class's
             BoundMethodWeakref objects indexed by the class's
             `calculate_key(target)` method applied to the target
             `calculate_key(target)` method applied to the target
-            objects. This weak value dictionary is used to
+            objects.  This weak value dictionary is used to
             short-circuit creation so that multiple references
             short-circuit creation so that multiple references
             to the same (object, function) pair produce the
             to the same (object, function) pair produce the
             same BoundMethodWeakref instance.
             same BoundMethodWeakref instance.
@@ -222,7 +222,7 @@ class BoundNonDescriptorMethodWeakref(BoundMethodWeakref):  # pragma: no cover
             ...     return 'foo'
             ...     return 'foo'
             >>> A.bar = foo
             >>> A.bar = foo
 
 
-        But this shouldn't be a common use case. So, on platforms where methods
+        But this shouldn't be a common use case.  So, on platforms where methods
         aren't descriptors (such as Jython) this implementation has the
         aren't descriptors (such as Jython) this implementation has the
         advantage of working in the most cases.
         advantage of working in the most cases.
     """
     """
@@ -241,7 +241,7 @@ class BoundNonDescriptorMethodWeakref(BoundMethodWeakref):  # pragma: no cover
             on_delete (Callable): Optional callback which will be called
             on_delete (Callable): Optional callback which will be called
                 when this weak reference ceases to be valid
                 when this weak reference ceases to be valid
                 (i.e. either the object or the function is garbage
                 (i.e. either the object or the function is garbage
-                collected). Should take a single argument,
+                collected).  Should take a single argument,
                 which will be passed a pointer to this object.
                 which will be passed a pointer to this object.
         """
         """
         assert getattr(target.__self__, target.__name__) == target
         assert getattr(target.__self__, target.__name__) == target
@@ -265,7 +265,7 @@ class BoundNonDescriptorMethodWeakref(BoundMethodWeakref):  # pragma: no cover
             function = self.weak_fun()
             function = self.weak_fun()
             if function is not None:
             if function is not None:
                 # Using curry() would be another option, but it erases the
                 # Using curry() would be another option, but it erases the
-                # "signature" of the function. That is, after a function is
+                # "signature" of the function.  That is, after a function is
                 # curried, the inspect module can't be used to determine how
                 # curried, the inspect module can't be used to determine how
                 # many arguments the function expects, nor what keyword
                 # many arguments the function expects, nor what keyword
                 # arguments it supports, and pydispatcher needs this
                 # arguments it supports, and pydispatcher needs this

+ 9 - 9
celery/utils/dispatch/signal.py

@@ -57,7 +57,7 @@ class Signal(object):  # pragma: no cover
 
 
         Arguments:
         Arguments:
             receiver (Callable): A function or an instance method which is to
             receiver (Callable): A function or an instance method which is to
-                receive signals. Receivers must be hashable objects.
+                receive signals.  Receivers must be hashable objects.
 
 
                 if weak is :const:`True`, then receiver must be
                 if weak is :const:`True`, then receiver must be
                 weak-referenceable (more precisely :func:`saferef.safe_ref()`
                 weak-referenceable (more precisely :func:`saferef.safe_ref()`
@@ -75,11 +75,11 @@ class Signal(object):  # pragma: no cover
 
 
             weak (bool): Whether to use weak references to the receiver.
             weak (bool): Whether to use weak references to the receiver.
                 By default, the module will attempt to use weak references to
                 By default, the module will attempt to use weak references to
-                the receiver objects. If this parameter is false, then strong
+                the receiver objects.  If this parameter is false, then strong
                 references will be used.
                 references will be used.
 
 
             dispatch_uid (Hashable): An identifier used to uniquely identify a
             dispatch_uid (Hashable): An identifier used to uniquely identify a
-                particular instance of a receiver. This will usually be a
+                particular instance of a receiver.  This will usually be a
                 string, though it may be anything hashable.
                 string, though it may be anything hashable.
         """
         """
         def _handle_options(sender=None, weak=True, dispatch_uid=None):
         def _handle_options(sender=None, weak=True, dispatch_uid=None):
@@ -121,12 +121,12 @@ class Signal(object):  # pragma: no cover
                    dispatch_uid=None):
                    dispatch_uid=None):
         """Disconnect receiver from sender for signal.
         """Disconnect receiver from sender for signal.
 
 
-        If weak references are used, disconnect needn't be called. The
-        receiver will be removed from dispatch automatically.
+        If weak references are used, disconnect needn't be called.
+        The receiver will be removed from dispatch automatically.
 
 
         Arguments:
         Arguments:
-            receiver (Callable): The registered receiver to disconnect. May be
-                none if `dispatch_uid` is specified.
+            receiver (Callable): The registered receiver to disconnect.
+                May be none if `dispatch_uid` is specified.
 
 
             sender (Any): The registered sender to disconnect.
             sender (Any): The registered sender to disconnect.
 
 
@@ -154,8 +154,8 @@ class Signal(object):  # pragma: no cover
         have all receivers called if a raises an error.
         have all receivers called if a raises an error.
 
 
         Arguments:
         Arguments:
-            sender (Any): The sender of the signal. Either a specific
-                object or :const:`None`.
+            sender (Any): The sender of the signal.
+                Either a specific object or :const:`None`.
             **named (Any): Named arguments which will be passed to receivers.
             **named (Any): Named arguments which will be passed to receivers.
 
 
         Returns:
         Returns:

+ 1 - 1
celery/utils/log.py

@@ -240,7 +240,7 @@ class LoggingProxy(object):
         self.closed = True
         self.closed = True
 
 
     def isatty(self):
     def isatty(self):
-        """Always return :const:`False`. Just here for file support."""
+        """Always return :const:`False`.  Just here for file support."""
         return False
         return False
 
 
 
 

+ 1 - 1
celery/utils/threads.py

@@ -245,7 +245,7 @@ class _LocalStack(object):
 
 
 @python_2_unicode_compatible
 @python_2_unicode_compatible
 class LocalManager(object):
 class LocalManager(object):
-    """Local objects cannot manage themselves. For that you need a local
+    """Local objects cannot manage themselves.  For that you need a local
     manager.  You can pass a local manager multiple locals or add them
     manager.  You can pass a local manager multiple locals or add them
     later by appending them to ``manager.locals``.  Every time the manager
     later by appending them to ``manager.locals``.  Every time the manager
     cleans up, it will clean up all the data left in the locals for this
     cleans up, it will clean up all the data left in the locals for this

+ 1 - 1
celery/worker/consumer/consumer.py

@@ -65,7 +65,7 @@ Will retry using next failover.\
 """
 """
 
 
 UNKNOWN_FORMAT = """\
 UNKNOWN_FORMAT = """\
-Received and deleted unknown message. Wrong destination?!?
+Received and deleted unknown message.  Wrong destination?!?
 
 
 The full contents of the message body was: %s
 The full contents of the message body was: %s
 """
 """

+ 1 - 1
celery/worker/control.py

@@ -144,7 +144,7 @@ def revoke(state, task_id, terminate=False, signal=None, **kwargs):
 
 
     Keyword Arguments:
     Keyword Arguments:
         terminate (bool): Also terminate the process if the task is active.
         terminate (bool): Also terminate the process if the task is active.
-        signal (str): Name of signal to use for terminate. E.g. ``KILL``.
+        signal (str): Name of signal to use for terminate.  E.g. ``KILL``.
     """
     """
     # supports list argument since 3.1
     # supports list argument since 3.1
     task_ids, task_id = set(maybe_list(task_id) or []), None
     task_ids, task_id = set(maybe_list(task_id) or []), None