Skip to content

Use set literals #931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debug_toolbar/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

CONFIG_DEFAULTS = {
# Toolbar options
'DISABLE_PANELS': set(['debug_toolbar.panels.redirects.RedirectsPanel']),
'DISABLE_PANELS': {'debug_toolbar.panels.redirects.RedirectsPanel'},
'INSERT_BEFORE': '</body>',
'JQUERY_URL': '//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js',
'RENDER_PANELS': None,
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Toolbar options

* ``DISABLE_PANELS``

Default: ``set(['debug_toolbar.panels.redirects.RedirectsPanel'])``
Default: ``{'debug_toolbar.panels.redirects.RedirectsPanel'}``

This setting is a set of the full Python paths to each panel that you
want disabled (but still displayed) by default.
Expand Down
2 changes: 1 addition & 1 deletion tests/panels/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def tearDown(self):

def test_disabled(self):
config = {
'DISABLE_PANELS': set(['debug_toolbar.panels.sql.SQLPanel'])
'DISABLE_PANELS': {'debug_toolbar.panels.sql.SQLPanel'}
}
self.assertTrue(self.panel.enabled)
with self.settings(DEBUG_TOOLBAR_CONFIG=config):
Expand Down
3 changes: 1 addition & 2 deletions tests/panels/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ def test_custom_context_processor(self):

def test_disabled(self):
config = {
'DISABLE_PANELS': set([
'debug_toolbar.panels.templates.TemplatesPanel'])
'DISABLE_PANELS': {'debug_toolbar.panels.templates.TemplatesPanel'}
}
self.assertTrue(self.panel.enabled)
with self.settings(DEBUG_TOOLBAR_CONFIG=config):
Expand Down