Ask Solem 15 лет назад
Родитель
Сommit
a40fc34d38

+ 1 - 1
celery/patch.py

@@ -22,8 +22,8 @@ def _check_logger_class():
     finally:
         logging._releaseLock()
 
+
 def monkeypatch():
     major, minor = sys.version_info[:2]
     if major == 2 and minor < 6: # python < 2.6
         _check_logger_class()
-

+ 0 - 1
celery/worker/listener.py

@@ -208,4 +208,3 @@ class CarrotListener(object):
 
     def stop(self):
         self.close_connection()
-

+ 0 - 3
celery/worker/revoke.py

@@ -37,7 +37,4 @@ class RevokeRegistry(UserDict):
         return sorted(self.items(), key=lambda (uuid, when): when)[0]
 
 
-
 revoked = RevokeRegistry()
-
-

+ 0 - 23
examples/django/demoproject/demoapp/tests.py

@@ -1,23 +0,0 @@
-"""
-This file demonstrates two different styles of tests (one doctest and one
-unittest). These will both pass when you run "manage.py test".
-
-Replace these with more appropriate tests for your application.
-"""
-
-from django.test import TestCase
-
-class SimpleTest(TestCase):
-    def test_basic_addition(self):
-        """
-        Tests that 1 + 1 always equals 2.
-        """
-        self.failUnlessEqual(1 + 1, 2)
-
-__test__ = {"doctest": """
-Another way to test that 1 + 1 is equal to 2.
-
->>> 1 + 1 == 2
-True
-"""}
-

+ 5 - 1
examples/django/demoproject/manage.py

@@ -4,7 +4,11 @@ try:
     import settings # Assumed to be in the same directory.
 except ImportError:
     import sys
-    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
+    sys.stderr.write("""Error: Can't find the file 'settings.py' in the \
+        directory containing %r. It appears you've customized things.
+        You'll have to run django-admin.py, passing it your settings module.
+        (If the file settings.py does indeed exist, it's causing an
+        ImportError somehow.)\n""" % __file__)
     sys.exit(1)
 
 if __name__ == "__main__":

+ 8 - 5
examples/django/demoproject/settings.py

@@ -9,12 +9,15 @@ ADMINS = (
 
 MANAGERS = ADMINS
 
-DATABASE_ENGINE = ''           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+DATABASE_ENGINE = ''           # 'postgresql_psycopg2', 'postgresql', 'mysql',
+                               # 'sqlite3' or 'oracle'.
 DATABASE_NAME = ''             # Or path to database file if using sqlite3.
 DATABASE_USER = ''             # Not used with sqlite3.
 DATABASE_PASSWORD = ''         # Not used with sqlite3.
-DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+DATABASE_HOST = ''             # Set to empty string for localhost.
+                               # Not used with sqlite3.
+DATABASE_PORT = ''             # Set to empty string for default.
+                               # Not used with sqlite3.
 
 INSTALLED_APPS = (
     'django.contrib.auth',
@@ -64,8 +67,8 @@ MIDDLEWARE_CLASSES = (
 ROOT_URLCONF = 'demoproject.urls'
 
 TEMPLATE_DIRS = (
-    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
+    # Put strings here, like "/home/html/django_templates" or
+    # "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
 )
-

+ 0 - 7
examples/django/demoproject/twitterfollow/models.py

@@ -18,10 +18,3 @@ class Status(models.Model):
     screen_name = models.CharField(max_length=200)
     created_at = models.DateTimeField()
     text = models.CharField(max_length=200)
-
-
-
-
-
-
-

+ 0 - 23
examples/django/demoproject/twitterfollow/tests.py

@@ -1,23 +0,0 @@
-"""
-This file demonstrates two different styles of tests (one doctest and one
-unittest). These will both pass when you run "manage.py test".
-
-Replace these with more appropriate tests for your application.
-"""
-
-from django.test import TestCase
-
-class SimpleTest(TestCase):
-    def test_basic_addition(self):
-        """
-        Tests that 1 + 1 always equals 2.
-        """
-        self.failUnlessEqual(1 + 1, 2)
-
-__test__ = {"doctest": """
-Another way to test that 1 + 1 is equal to 2.
-
->>> 1 + 1 == 2
-True
-"""}
-

+ 2 - 2
examples/django/demoproject/urls.py

@@ -1,4 +1,4 @@
-from django.conf.urls.defaults import *
+from django.conf.urls.defaults import patterns, include, url
 
 # Uncomment the next two lines to enable the admin:
 # from django.contrib import admin
@@ -8,7 +8,7 @@ urlpatterns = patterns('',
     # Example:
     # (r'^demoproject/', include('demoproject.foo.urls')),
 
-    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
+    # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
     # to INSTALLED_APPS to enable admin documentation:
     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
 

+ 0 - 1
examples/pythonproject/demoapp/test.py

@@ -13,4 +13,3 @@ print(repr(res))
 print(">>> add.delay(4, 4).wait()")
 res = add.delay(4, 4).wait()
 print(repr(res))
-