summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--compressor/filters/cssmin/__init__.py1
-rw-r--r--compressor/filters/jsmin/__init__.py1
-rw-r--r--compressor/storage.py1
-rw-r--r--compressor/tests/test_base.py6
-rw-r--r--requirements/tests.txt2
6 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 6d4b2bf..689ec52 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ testenv:
pip install Django
flake8:
- flake8 compressor --ignore=E501,E128,E701,E261,E301,E126,E127,E131
+ flake8 compressor --ignore=E501,E128,E701,E261,E301,E126,E127,E131,E402
runtests:
coverage run --branch --source=compressor `which django-admin.py` test --settings=compressor.test_settings compressor
diff --git a/compressor/filters/cssmin/__init__.py b/compressor/filters/cssmin/__init__.py
index 1f66b23..cc23cd2 100644
--- a/compressor/filters/cssmin/__init__.py
+++ b/compressor/filters/cssmin/__init__.py
@@ -17,5 +17,6 @@ class rCSSMinFilter(CallbackOutputFilter):
"keep_bang_comments": True
}
+
# This is for backwards compatibility.
CSSMinFilter = rCSSMinFilter
diff --git a/compressor/filters/jsmin/__init__.py b/compressor/filters/jsmin/__init__.py
index f32e6a4..1a466e1 100644
--- a/compressor/filters/jsmin/__init__.py
+++ b/compressor/filters/jsmin/__init__.py
@@ -9,6 +9,7 @@ class rJSMinFilter(CallbackOutputFilter):
"keep_bang_comments": True
}
+
# This is for backwards compatibility
JSMinFilter = rJSMinFilter
diff --git a/compressor/storage.py b/compressor/storage.py
index 4f55cf0..af0aaff 100644
--- a/compressor/storage.py
+++ b/compressor/storage.py
@@ -123,4 +123,5 @@ class DefaultStorage(LazyObject):
def _setup(self):
self._wrapped = get_storage_class(settings.COMPRESS_STORAGE)()
+
default_storage = DefaultStorage()
diff --git a/compressor/tests/test_base.py b/compressor/tests/test_base.py
index e057bda..32bfd28 100644
--- a/compressor/tests/test_base.py
+++ b/compressor/tests/test_base.py
@@ -115,7 +115,8 @@ class CompressorTestCase(SimpleTestCase):
assertEqual with internal newlines collapsed to single, and
trailing whitespace removed.
"""
- collapse = lambda x: re.sub(r'\n+', '\n', x).rstrip()
+ def collapse(s):
+ return re.sub(r'\n+', '\n', s).rstrip()
self.assertEqual(collapse(a), collapse(b))
def assertEqualSplits(self, a, b):
@@ -123,7 +124,8 @@ class CompressorTestCase(SimpleTestCase):
assertEqual for splits, particularly ignoring the presence of
a trailing newline on the content.
"""
- mangle = lambda split: [(x[0], x[1], x[2], x[3].rstrip()) for x in split]
+ def mangle(split):
+ return [(x[0], x[1], x[2], x[3].rstrip()) for x in split]
self.assertEqual(mangle(a), mangle(b))
def test_css_split(self):
diff --git a/requirements/tests.txt b/requirements/tests.txt
index 1538102..9d2b674 100644
--- a/requirements/tests.txt
+++ b/requirements/tests.txt
@@ -1,4 +1,4 @@
-flake8==2.4.0
+flake8==3.5.0
coverage==4.4
html5lib==0.9999999
mock==1.0.1