فهرست منبع

Fix grammar, PEP8 (#4188)

Nicolas Mota 7 سال پیش
والد
کامیت
19c66d6261
4فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 2 2
      celery/app/task.py
  2. 1 0
      examples/app/myapp.py
  3. 2 0
      examples/periodic-tasks/myapp.py
  4. 1 0
      examples/tutorial/tasks.py

+ 2 - 2
celery/app/task.py

@@ -132,7 +132,7 @@ class Context(object):
 
     @property
     def children(self):
-        # children must be an empy list for every thread
+        # children must be an empty list for every thread
         if self._children is None:
             self._children = []
         return self._children
@@ -383,7 +383,7 @@ class Task(object):
             _task_stack.pop()
 
     def __reduce__(self):
-        # - tasks are pickled into the name of the task only, and the reciever
+        # - tasks are pickled into the name of the task only, and the receiver
         # - simply grabs it from the local registry.
         # - in later versions the module of the task is also included,
         # - and the receiving side tries to import that module so that

+ 1 - 0
examples/app/myapp.py

@@ -37,5 +37,6 @@ app = Celery(
 def add(x, y):
     return x + y
 
+
 if __name__ == '__main__':
     app.start()

+ 2 - 0
examples/periodic-tasks/myapp.py

@@ -41,6 +41,7 @@ app = Celery(
 
 app.conf.timezone = 'UTC'
 
+
 @app.task
 def say(what):
     print(what)
@@ -54,5 +55,6 @@ def setup_periodic_tasks(sender, **kwargs):
     # See periodic tasks user guide for more examples:
     # http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html
 
+
 if __name__ == '__main__':
     app.start()

+ 1 - 0
examples/tutorial/tasks.py

@@ -8,5 +8,6 @@ app = Celery('tasks', broker='amqp://')
 def add(x, y):
     return x + y
 
+
 if __name__ == '__main__':
     app.start()