Skip to content

Commit

Permalink
Fix dash.staticfiles.finders.DashComponentSuitesFinder
Browse files Browse the repository at this point in the history
  • Loading branch information
pikhovkin committed Dec 5, 2018
1 parent cef320a commit 72db61e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions dash/staticfiles/finders.py
Expand Up @@ -5,16 +5,16 @@

from django.contrib.staticfiles import utils
from django.core.files.storage import FileSystemStorage
from django.contrib.staticfiles.finders import BaseFinder
from django.contrib.staticfiles.finders import FileSystemFinder

from ..development.base_component import ComponentRegistry


class DashComponentSuitesFinder(BaseFinder):
class DashComponentSuitesFinder(FileSystemFinder):
prefix = '_dash-component-suites/'
ignore_patterns = ['*.py', '*.pyc', '*.json']

def __init__(self, *args, **kwargs):
def __init__(self, *args, **kwargs): # pylint: disable=super-init-not-called
self.locations = []
self.storages = OrderedDict()

Expand All @@ -30,12 +30,10 @@ def __init__(self, *args, **kwargs):
filesystem_storage.prefix = prefix
self.storages[root] = filesystem_storage

super(DashComponentSuitesFinder, self).__init__(*args, **kwargs)

def list(self, ignore_patterns):
""" List static files in all locations.
"""
for prefix, root in self.locations:
for prefix, root in self.locations: # pylint: disable=unused-variable
storage = self.storages[root]
for path in utils.get_files(storage, ignore_patterns=self.ignore_patterns + (ignore_patterns or [])):
yield path, storage
2 changes: 1 addition & 1 deletion dash/version.py
@@ -1 +1 @@
__version__ = '0.8.0'
__version__ = '0.8.1'

0 comments on commit 72db61e

Please sign in to comment.