A handful of flake8 fixes

This commit is contained in:
Alex Gaynor 2013-11-23 08:26:11 -08:00
parent 1e97058417
commit 0ec712dd11
3 changed files with 6 additions and 6 deletions

View File

@ -114,6 +114,7 @@ class CacheHandler(object):
caches = CacheHandler() caches = CacheHandler()
class DefaultCacheProxy(object): class DefaultCacheProxy(object):
""" """
Proxy access to the default Cache object's attributes. Proxy access to the default Cache object's attributes.

View File

@ -1,6 +1,6 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from django.core.cache import cache, caches, InvalidCacheBackendError from django.core.cache import caches, InvalidCacheBackendError
from django.core.cache.utils import make_template_fragment_key from django.core.cache.utils import make_template_fragment_key
from django.template import Library, Node, TemplateSyntaxError, VariableDoesNotExist from django.template import Library, Node, TemplateSyntaxError, VariableDoesNotExist

View File

@ -6,10 +6,8 @@ from __future__ import unicode_literals
import os import os
import pickle import pickle
import random
import re import re
import shutil import shutil
import string
import tempfile import tempfile
import threading import threading
import time import time
@ -1039,8 +1037,8 @@ class MemcachedCacheTests(BaseCacheTests, TestCase):
# Explicitly display a skipped test if no configured cache uses MemcachedCache # Explicitly display a skipped test if no configured cache uses MemcachedCache
@unittest.skipUnless( @unittest.skipUnless(
any(cache['BACKEND'] == 'django.core.cache.backends.memcached.MemcachedCache' any(c['BACKEND'] == 'django.core.cache.backends.memcached.MemcachedCache'
for cache in settings.CACHES.values()), for c in settings.CACHES.values()),
"cache with python-memcached library not available") "cache with python-memcached library not available")
def test_memcached_uses_highest_pickle_version(self): def test_memcached_uses_highest_pickle_version(self):
# Regression test for #19810 # Regression test for #19810
@ -1159,7 +1157,6 @@ class CacheUtils(TestCase):
self.path = '/cache/test/' self.path = '/cache/test/'
self.factory = RequestFactory() self.factory = RequestFactory()
def test_patch_vary_headers(self): def test_patch_vary_headers(self):
headers = ( headers = (
# Initial vary, new headers, resulting vary. # Initial vary, new headers, resulting vary.
@ -1903,6 +1900,7 @@ class TestMakeTemplateFragmentKey(TestCase):
self.assertEqual(key, self.assertEqual(key,
'template.cache.spam.f27688177baec990cdf3fbd9d9c3f469') 'template.cache.spam.f27688177baec990cdf3fbd9d9c3f469')
class CacheHandlerTest(TestCase): class CacheHandlerTest(TestCase):
def test_same_instance(self): def test_same_instance(self):
""" """
@ -1919,6 +1917,7 @@ class CacheHandlerTest(TestCase):
instances. instances.
""" """
c = [] c = []
def runner(): def runner():
c.append(caches['default']) c.append(caches['default'])