Commit d06351e4 by Timothée Peignier

fix some pep8 issues

parent 14eb52c3
...@@ -145,7 +145,7 @@ class Compressor(object): ...@@ -145,7 +145,7 @@ class Compressor(object):
def construct_asset_path(self, asset_path, css_path, output_filename, variant=None): def construct_asset_path(self, asset_path, css_path, output_filename, variant=None):
"""Return a rewritten asset URL for a stylesheet""" """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): if self.embeddable(public_path, variant):
return "__EMBED__%s" % public_path return "__EMBED__%s" % public_path
if not posixpath.isabs(asset_path): if not posixpath.isabs(asset_path):
...@@ -158,7 +158,7 @@ class Compressor(object): ...@@ -158,7 +158,7 @@ class Compressor(object):
font = ext in FONT_EXTS font = ext in FONT_EXTS
if not variant: if not variant:
return False 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 return False
if not ext in EMBED_EXTS: if not ext in EMBED_EXTS:
return False return False
......
...@@ -30,7 +30,7 @@ class PipelineManifest(Manifest): ...@@ -30,7 +30,7 @@ class PipelineManifest(Manifest):
def cache(self): def cache(self):
ignore_patterns = getattr(settings, "STATICFILES_IGNORE_PATTERNS", None) ignore_patterns = getattr(settings, "STATICFILES_IGNORE_PATTERNS", None)
if settings.PIPELINE: if settings.PIPELINE:
for package in self.packages: for package in self.packages:
yield str(self.packager.individual_url(package.output_filename)) yield str(self.packager.individual_url(package.output_filename))
......
...@@ -88,7 +88,7 @@ class BaseFinderStorage(PipelineStorage): ...@@ -88,7 +88,7 @@ class BaseFinderStorage(PipelineStorage):
return path return path
def exists(self, name): def exists(self, name):
exists = self.finders.find(name) != None exists = self.finders.find(name) is not None
if not exists: if not exists:
return super(BaseFinderStorage, self).exists(name) return super(BaseFinderStorage, self).exists(name)
return exists 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