mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
All: Apply Black coding rules
This commit is contained in:
@ -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 []
|
||||
|
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user