All: Apply Black coding rules

This commit is contained in:
2018-10-04 21:29:19 +02:00
parent 0581c667de
commit cb58b00b6e
204 changed files with 13173 additions and 6376 deletions

View File

@ -34,21 +34,20 @@ class ScssFinder(FileSystemFinder):
"""
Find static *.css files compiled on the fly
"""
locations = []
def __init__(self, apps=None, *args, **kwargs):
location = settings.STATIC_ROOT
if not os.path.isdir(location):
return
self.locations = [
('', location),
]
self.locations = [("", location)]
self.storages = OrderedDict()
filesystem_storage = FileSystemStorage(location=location)
filesystem_storage.prefix = self.locations[0][0]
self.storages[location] = filesystem_storage
def find(self, path, all=False):
if path.endswith('.css'):
if path.endswith(".css"):
return super(ScssFinder, self).find(path, all)
return []

View File

@ -39,7 +39,8 @@ class ScssProcessor(object):
Else : give the path of the corresponding css supposed to already be compiled
Don't forget to use compilestatics to compile scss for production
"""
prefix = iri_to_uri(getattr(settings, 'STATIC_URL', '/static/'))
prefix = iri_to_uri(getattr(settings, "STATIC_URL", "/static/"))
storage = ScssFileStorage()
scss_extensions = [".scss"]
@ -63,7 +64,7 @@ class ScssProcessor(object):
"include_paths": settings.SASS_INCLUDE_FOLDERS,
}
if settings.SASS_PRECISION:
compile_args['precision'] = settings.SASS_PRECISION
compile_args["precision"] = settings.SASS_PRECISION
content = sass.compile(**compile_args)
content = force_bytes(content)