PEP8 cleanup

This commit is contained in:
Antti Hirvonen
2012-09-13 12:56:09 +03:00
parent 09dc8498cd
commit 6f21dd4bb2
2 changed files with 5 additions and 5 deletions

View File

@@ -7,8 +7,8 @@ from django.core.files.base import ContentFile
from django.template import Context
from django.template.loader import render_to_string
from django.utils.encoding import smart_unicode
from django.utils.safestring import mark_safe
from django.utils.importlib import import_module
from django.utils.safestring import mark_safe
from compressor.cache import get_hexdigest, get_mtime
@@ -214,7 +214,7 @@ class Compressor(object):
except ImportError:
return True, CompilerFilter(content, filter_type=self.type,
command=filter_or_command, filename=filename).input(
**kwargs)
**kwargs)
try:
precompiler_class = getattr(mod, cls_name)
except AttributeError:
@@ -223,7 +223,7 @@ class Compressor(object):
else:
return True, precompiler_class(content, attrs,
filter_type=self.type, filename=filename).input(
**kwargs)
**kwargs)
return False, content
def filter(self, content, method, **kwargs):

View File

@@ -148,7 +148,7 @@ class CompressorTestCase(TestCase):
original_precompilers = settings.COMPRESS_PRECOMPILERS
settings.COMPRESS_ENABLED = True
settings.COMPRESS_PRECOMPILERS = (
('text/foobar', 'compressor.tests.base.TestPrecompiler'),
('text/foobar', 'compressor.tests.base.TestPrecompiler'),
)
css = '<style type="text/foobar">p { border:10px solid red;}</style>'
css_node = CssCompressor(css)
@@ -160,7 +160,7 @@ class CompressorTestCase(TestCase):
original_precompilers = settings.COMPRESS_PRECOMPILERS
settings.COMPRESS_ENABLED = True
settings.COMPRESS_PRECOMPILERS = (
('text/foobar', 'compressor.tests.base.NonexistentFilter'),
('text/foobar', 'compressor.tests.base.NonexistentFilter'),
)
css = '<style type="text/foobar">p { border:10px solid red;}</style>'
css_node = CssCompressor(css)