From f042415349a8c2782e0e8767baf3f66a651ed8e6 2014-12-09 00:22:03 From: Scott Sanderson Date: 2014-12-09 00:22:03 Subject: [PATCH] Minor cleanups in the contents API. Noticed while poking around with a linter enabled. --- diff --git a/IPython/html/services/contents/handlers.py b/IPython/html/services/contents/handlers.py index ea33f17..121e325 100644 --- a/IPython/html/services/contents/handlers.py +++ b/IPython/html/services/contents/handlers.py @@ -62,7 +62,7 @@ class ContentsHandler(IPythonHandler): if type_ not in {None, 'directory', 'file', 'notebook'}: raise web.HTTPError(400, u'Type %r is invalid' % type_) - format = self.get_query_argument('format', default=None)# + format = self.get_query_argument('format', default=None) if format not in {None, 'text', 'base64'}: raise web.HTTPError(400, u'Format %r is invalid' % format) diff --git a/IPython/html/static/services/config.js b/IPython/html/static/services/config.js index a3632f7..139a02a 100644 --- a/IPython/html/static/services/config.js +++ b/IPython/html/static/services/config.js @@ -6,6 +6,7 @@ define([ 'base/js/utils', ], function($, utils) { + "use strict"; var ConfigSection = function(section_name, options) { this.section_name = section_name; this.base_url = options.base_url; diff --git a/IPython/html/static/services/contents.js b/IPython/html/static/services/contents.js index f9bb1a2..768bdd4 100644 --- a/IPython/html/static/services/contents.js +++ b/IPython/html/static/services/contents.js @@ -6,6 +6,7 @@ define([ 'jquery', 'base/js/utils', ], function(IPython, $, utils) { + "use strict"; var Contents = function(options) { /** * Constructor @@ -90,7 +91,7 @@ define([ dataType : "json", }; var url = this.api_url(path); - params = {}; + var params = {}; if (options.type) { params.type = options.type; } if (options.format) { params.format = options.format; } return utils.promising_ajax(url + '?' + $.param(params), settings);