Skip to content

Commit 0426748

Browse files
committed
Use set literals
Avoids unnecessary, temporary list.
1 parent e794d0e commit 0426748

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

debug_toolbar/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
CONFIG_DEFAULTS = {
1717
# Toolbar options
18-
'DISABLE_PANELS': set(['debug_toolbar.panels.redirects.RedirectsPanel']),
18+
'DISABLE_PANELS': {'debug_toolbar.panels.redirects.RedirectsPanel'},
1919
'INSERT_BEFORE': '</body>',
2020
'JQUERY_URL': '//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js',
2121
'RENDER_PANELS': None,

docs/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Toolbar options
5252

5353
* ``DISABLE_PANELS``
5454

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

5757
This setting is a set of the full Python paths to each panel that you
5858
want disabled (but still displayed) by default.

tests/panels/test_sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def tearDown(self):
2626

2727
def test_disabled(self):
2828
config = {
29-
'DISABLE_PANELS': set(['debug_toolbar.panels.sql.SQLPanel'])
29+
'DISABLE_PANELS': {'debug_toolbar.panels.sql.SQLPanel'}
3030
}
3131
self.assertTrue(self.panel.enabled)
3232
with self.settings(DEBUG_TOOLBAR_CONFIG=config):

tests/panels/test_template.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ def test_custom_context_processor(self):
7676

7777
def test_disabled(self):
7878
config = {
79-
'DISABLE_PANELS': set([
80-
'debug_toolbar.panels.templates.TemplatesPanel'])
79+
'DISABLE_PANELS': {'debug_toolbar.panels.templates.TemplatesPanel'}
8180
}
8281
self.assertTrue(self.panel.enabled)
8382
with self.settings(DEBUG_TOOLBAR_CONFIG=config):

0 commit comments

Comments
 (0)