Skip to content

Commit 0518f11

Browse files
committed
more flakes
1 parent 4acabab commit 0518f11

File tree

13 files changed

+143
-258
lines changed

13 files changed

+143
-258
lines changed

djcelery/managers.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@ def delete_expired(self, expires):
111111
try:
112112
self.get_all_expired(expires).update(hidden=True)
113113
cursor = self.connection_for_write().cursor()
114-
cursor.execute('DELETE FROM %s WHERE hidden=%%s' % (
115-
self.model._meta.db_table, ), (True, ))
114+
cursor.execute(
115+
'DELETE FROM %s WHERE hidden=%%s' % (
116+
self.model._meta.db_table, ),
117+
(True, ),
118+
)
116119
except:
117120
transaction.rollback()
118121
raise
@@ -236,6 +239,8 @@ def expire_by_states(self, states, expires):
236239

237240
def purge(self):
238241
cursor = self.connection_for_write().cursor()
239-
cursor.execute('DELETE FROM %s WHERE hidden=%%s' % (
240-
self.model._meta.db_table, ), (True, ))
242+
cursor.execute(
243+
'DELETE FROM %s WHERE hidden=%%s' % (self.model._meta.db_table, ),
244+
(True, ),
245+
)
241246
transaction.commit_unless_managed()

docs/_ext/applyxrefs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
testing = False
77

8-
DONT_TOUCH = (
9-
'./index.txt',
10-
)
8+
DONT_TOUCH = ('./index.txt', )
119

1210

1311
def target_name(fn):

docs/_ext/literals_to_xrefs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ def fixliterals(fname):
9595
replace_type in ("class", "func", "meth"):
9696
default = default[:-2]
9797
replace_value = raw_input(
98-
colorize("Text <target> [", fg="yellow") + default + \
99-
colorize("]: ", fg="yellow")).strip()
98+
colorize("Text <target> [", fg="yellow") +
99+
default +
100+
colorize("]: ", fg="yellow"),
101+
).strip()
100102
if not replace_value:
101103
replace_value = default
102104
new.append(":%s:`%s`" % (replace_type, replace_value))

docs/conf.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@
88
# absolute, like shown here.
99
sys.path.insert(0, os.getcwd())
1010
import django
11-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
11+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
1212
if django.VERSION < (1, 4):
1313
from django.core.management import setup_environ
14-
setup_environ(__import__(os.environ["DJANGO_SETTINGS_MODULE"]))
14+
setup_environ(__import__(os.environ['DJANGO_SETTINGS_MODULE']))
1515
import djcelery
1616

1717
# General configuration
1818
# ---------------------
1919

20-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage',
21-
'sphinxcontrib.issuetracker']
20+
extensions = [
21+
'sphinx.ext.autodoc',
22+
'sphinx.ext.coverage',
23+
'sphinxcontrib.issuetracker',
24+
]
2225

2326
# Add any paths that contain templates here, relative to this directory.
2427
templates_path = ['.templates']
@@ -38,7 +41,7 @@
3841
# built documents.
3942
#
4043
# The short X.Y version.
41-
version = ".".join(map(str, djcelery.VERSION[0:2]))
44+
version = '.'.join(map(str, djcelery.VERSION[0:2]))
4245
# The full version, including alpha/beta/rc tags.
4346
release = djcelery.__version__
4447

@@ -64,19 +67,20 @@
6467
html_use_index = True
6568

6669
latex_documents = [
67-
('index', 'django-celery.tex', ur'django-celery Documentation',
68-
ur'Ask Solem', 'manual'),
70+
('index', 'django-celery.tex',
71+
u'django-celery Documentation',
72+
u'Ask Solem', 'manual'),
6973
]
7074

71-
html_theme = "celery"
72-
html_theme_path = ["_theme"]
75+
html_theme = 'celery'
76+
html_theme_path = ['_theme']
7377
html_sidebars = {
7478
'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],
7579
'**': ['sidebarlogo.html', 'localtoc.html', 'relations.html',
7680
'sourcelink.html', 'searchbox.html'],
7781
}
7882

7983
### Issuetracker
80-
issuetracker = "github"
81-
issuetracker_project = "celery/django-celery"
84+
issuetracker = 'github'
85+
issuetracker_project = 'celery/django-celery'
8286
issuetracker_issue_pattern = r'[Ii]ssue #(\d+)'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from django.db import models
1+
from django.db import models # noqa
22

33
# Create your models here.

examples/demoproject/demoproject/settings.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
import djcelery
66
djcelery.setup_loader()
77

8-
BROKER_URL = "amqp://guest:guest@localhost:5672//"
9-
CELERY_RESULT_BACKEND = "database"
8+
BROKER_URL = 'amqp://guest:guest@localhost:5672//'
9+
CELERY_RESULT_BACKEND = 'database'
1010

1111
# -- other necessary settings.
1212

13-
DATABASES = {"default": {"NAME": "testdb.sqlite",
14-
"ENGINE": "django.db.backends.sqlite3",
15-
"USER": '',
16-
"PASSWORD": '',
17-
"HOST": '',
18-
"PORT": ''}}
13+
DATABASES = {'default': {'NAME': 'testdb.sqlite',
14+
'ENGINE': 'django.db.backends.sqlite3',
15+
'USER': '',
16+
'PASSWORD': '',
17+
'HOST': '',
18+
'PORT': ''}}
1919

2020

2121
INSTALLED_APPS = (
@@ -68,27 +68,27 @@
6868
USE_TZ = True
6969

7070
# Absolute filesystem path to the directory that will hold user-uploaded files.
71-
# Example: "/home/media/media.lawrence.com/media/"
71+
# Example: '/home/media/media.lawrence.com/media/'
7272
MEDIA_ROOT = ''
7373

7474
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
7575
# trailing slash.
76-
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
76+
# Examples: 'http://media.lawrence.com/media/', 'http://example.com/media/'
7777
MEDIA_URL = ''
7878

7979
# Absolute path to the directory static files should be collected to.
8080
# Don't put anything in this directory yourself; store your static files
81-
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
82-
# Example: "/home/media/media.lawrence.com/static/"
81+
# in apps' 'static/' subdirectories and in STATICFILES_DIRS.
82+
# Example: '/home/media/media.lawrence.com/static/'
8383
STATIC_ROOT = ''
8484

8585
# URL prefix for static files.
86-
# Example: "http://media.lawrence.com/static/"
86+
# Example: 'http://media.lawrence.com/static/'
8787
STATIC_URL = '/static/'
8888

8989
# Additional locations of static files
9090
STATICFILES_DIRS = (
91-
# Put strings here, like "/home/html/static" or "C:/www/django/static".
91+
# Put strings here, like '/home/html/static' or 'C:/www/django/static'.
9292
# Always use forward slashes, even on Windows.
9393
# Don't forget to use absolute paths, not relative paths.
9494
)
@@ -98,7 +98,6 @@
9898
STATICFILES_FINDERS = (
9999
'django.contrib.staticfiles.finders.FileSystemFinder',
100100
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
101-
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
102101
)
103102

104103
# Make this unique, and don't share it with anybody.
@@ -108,7 +107,6 @@
108107
TEMPLATE_LOADERS = (
109108
'django.template.loaders.filesystem.Loader',
110109
'django.template.loaders.app_directories.Loader',
111-
# 'django.template.loaders.eggs.Loader',
112110
)
113111

114112
MIDDLEWARE_CLASSES = (
@@ -127,7 +125,8 @@
127125
WSGI_APPLICATION = 'demoproject.wsgi.application'
128126

129127
TEMPLATE_DIRS = (
130-
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
128+
# Put strings here, like '/home/html/django_templates'
129+
# or 'C:/www/django/templates'.
131130
# Always use forward slashes, even on Windows.
132131
# Don't forget to use absolute paths, not relative paths.
133132
)

examples/demoproject/demoproject/urls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
from django.contrib import admin
66
admin.autodiscover()
77

8-
urlpatterns = patterns('',
8+
urlpatterns = patterns(
9+
'',
910
# Example:
1011
# (r'^demoproject/', include('demoproject.foo.urls')),
1112

extra/release/flakeplus.py

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)