Skip to content

Commit 0abb0d6

Browse files
delsimGibbsConsulting
authored andcommitted
Prerelease 0.9.6 (GibbsConsulting#107)
* v0.9.5 packages for future reference * Linter-inspired improvements * Update version to 0.9.6
1 parent 1429a3e commit 0abb0d6

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

demo/demo/bootstrap_app.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
SOFTWARE.
2323
'''
2424

25-
import dash
2625
import dash_bootstrap_components as dbc
2726
import dash_html_components as html
2827

@@ -33,8 +32,7 @@
3332

3433
dd.layout = html.Div(
3534
[
36-
dbc.Alert("This is an alert", color="primary"),
37-
dbc.Alert("Danger", color="danger"),
38-
]
35+
dbc.Alert("This is an alert", color="primary"),
36+
dbc.Alert("Danger", color="danger"),
37+
]
3938
)
40-

django_plotly_dash/dash_wrapper.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@ class DjangoDash:
8383
8484
To use, construct an instance of DjangoDash() in place of a Dash() one.
8585
'''
86+
#pylint: disable=too-many-instance-attributes
8687
def __init__(self, name=None, serve_locally=False,
8788
expanded_callbacks=False,
8889
add_bootstrap_links=False,
8990
suppress_callback_exceptions=False,
90-
**kwargs): # pylint: disable=unused-argument
91+
**kwargs): # pylint: disable=unused-argument, too-many-arguments
9192
if name is None:
9293
global uid_counter # pylint: disable=global-statement
9394
uid_counter += 1

django_plotly_dash/finders.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@
3333
from django.core.files.storage import FileSystemStorage
3434

3535
from django.conf import settings
36-
from django.apps import apps
36+
from django.apps import apps #pylint: disable=unused-import
3737

3838
from django_plotly_dash.dash_wrapper import all_apps
3939

4040
class DashComponentFinder(BaseFinder):
4141
'Find static files in components'
4242

43+
#pylint: disable=abstract-method, redefined-builtin
44+
4345
def __init__(self):
4446

4547
self.locations = []
@@ -87,20 +89,24 @@ def find(self, path, all=False):
8789

8890
return matches
8991

92+
# pylint: disable=inconsistent-return-statements, no-self-use
9093
def find_location(self, path):
94+
'Return location, if it exists'
9195
if os.path.exists(path):
9296
return path
9397

9498
def list(self, ignore_patterns):
9599
for component_name in self.locations:
96100
storage = self.storages[component_name]
97101
for path in get_files(storage, ignore_patterns + self.ignore_patterns):
98-
print("DashAssetFinder",path,storage)
102+
print("DashAssetFinder", path, storage)
99103
yield path, storage
100104

101105
class DashAssetFinder(BaseFinder):
102106
'Find static files in asset directories'
103107

108+
#pylint: disable=unused-import, unused-variable, no-name-in-module, import-error, abstract-method
109+
104110
def __init__(self):
105111

106112
# Get all registered apps
@@ -120,7 +126,7 @@ def __init__(self):
120126
for app_slug, obj in self.apps.items():
121127
caller_module = obj.caller_module
122128
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)
124130

125131
if os.path.isdir(path_directory):
126132

@@ -134,6 +140,7 @@ def __init__(self):
134140

135141
super(DashAssetFinder, self).__init__()
136142

143+
#pylint: disable=redefined-builtin
137144
def find(self, path, all=False):
138145
return []
139146

django_plotly_dash/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
This addresses issue #81
55
'''
66

7-
__version__ = "0.9.5"
7+
__version__ = "0.9.6"

django_plotly_dash/views.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def main_view(request, ident, stateless=False, cache_id=None, **kwargs):
101101
return HttpResponse(resp)
102102

103103
def component_component_suites(request, resource=None, component=None, **kwargs):
104+
'Return part of a client-side component, served locally for some reason'
104105
return component_suites(request,
105106
resource=resource,
106107
component=component,
@@ -116,7 +117,7 @@ def component_suites(request, resource=None, component=None, extra_element="", *
116117
else:
117118
redone_url = "/static/dash/component/%s/%s%s" %(component, extra_element, resource)
118119

119-
print("Redirecting to :",redone_url)
120+
print("Redirecting to :", redone_url)
120121

121122
return HttpResponseRedirect(redirect_to=redone_url)
122123

0 commit comments

Comments
 (0)