33
33
from django .core .files .storage import FileSystemStorage
34
34
35
35
from django .conf import settings
36
- from django .apps import apps
36
+ from django .apps import apps #pylint: disable=unused-import
37
37
38
38
from django_plotly_dash .dash_wrapper import all_apps
39
39
40
40
class DashComponentFinder (BaseFinder ):
41
41
'Find static files in components'
42
42
43
+ #pylint: disable=abstract-method, redefined-builtin
44
+
43
45
def __init__ (self ):
44
46
45
47
self .locations = []
@@ -87,20 +89,24 @@ def find(self, path, all=False):
87
89
88
90
return matches
89
91
92
+ # pylint: disable=inconsistent-return-statements, no-self-use
90
93
def find_location (self , path ):
94
+ 'Return location, if it exists'
91
95
if os .path .exists (path ):
92
96
return path
93
97
94
98
def list (self , ignore_patterns ):
95
99
for component_name in self .locations :
96
100
storage = self .storages [component_name ]
97
101
for path in get_files (storage , ignore_patterns + self .ignore_patterns ):
98
- print ("DashAssetFinder" ,path ,storage )
102
+ print ("DashAssetFinder" , path , storage )
99
103
yield path , storage
100
104
101
105
class DashAssetFinder (BaseFinder ):
102
106
'Find static files in asset directories'
103
107
108
+ #pylint: disable=unused-import, unused-variable, no-name-in-module, import-error, abstract-method
109
+
104
110
def __init__ (self ):
105
111
106
112
# Get all registered apps
@@ -120,7 +126,7 @@ def __init__(self):
120
126
for app_slug , obj in self .apps .items ():
121
127
caller_module = obj .caller_module
122
128
location = obj .caller_module_location
123
- path_directory = os .path .join (os .path .dirname (location ),self .subdir )
129
+ path_directory = os .path .join (os .path .dirname (location ), self .subdir )
124
130
125
131
if os .path .isdir (path_directory ):
126
132
@@ -134,6 +140,7 @@ def __init__(self):
134
140
135
141
super (DashAssetFinder , self ).__init__ ()
136
142
143
+ #pylint: disable=redefined-builtin
137
144
def find (self , path , all = False ):
138
145
return []
139
146
0 commit comments