Commit d06351e4 by Timothée Peignier

fix some pep8 issues

parent 14eb52c3
......@@ -145,7 +145,7 @@ class Compressor(object):
def construct_asset_path(self, asset_path, css_path, output_filename, variant=None):
"""Return a rewritten asset URL for a stylesheet"""
public_path = self.absolute_path(asset_path, os.path.dirname(css_path).replace('\\','/'))
public_path = self.absolute_path(asset_path, os.path.dirname(css_path).replace('\\', '/'))
if self.embeddable(public_path, variant):
return "__EMBED__%s" % public_path
if not posixpath.isabs(asset_path):
......@@ -158,7 +158,7 @@ class Compressor(object):
font = ext in FONT_EXTS
if not variant:
return False
if not (re.search(settings.PIPELINE_EMBED_PATH, path.replace('\\','/')) and self.storage.exists(path)):
if not (re.search(settings.PIPELINE_EMBED_PATH, path.replace('\\', '/')) and self.storage.exists(path)):
return False
if not ext in EMBED_EXTS:
return False
......
......@@ -30,7 +30,7 @@ class PipelineManifest(Manifest):
def cache(self):
ignore_patterns = getattr(settings, "STATICFILES_IGNORE_PATTERNS", None)
if settings.PIPELINE:
for package in self.packages:
yield str(self.packager.individual_url(package.output_filename))
......
......@@ -88,7 +88,7 @@ class BaseFinderStorage(PipelineStorage):
return path
def exists(self, name):
exists = self.finders.find(name) != None
exists = self.finders.find(name) is not None
if not exists:
return super(BaseFinderStorage, self).exists(name)
return exists
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment