From 0809f7462249381697be5e46996458dc8b61928d Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 10 Oct 2018 14:21:45 -0400 Subject: [PATCH] LINT --- src/runpython.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/runpython.c b/src/runpython.c index ce086db41..ca8484b3a 100644 --- a/src/runpython.c +++ b/src/runpython.c @@ -77,7 +77,8 @@ EM_JS(int, runpython_init_js, (), { var jsimports = Module.hiwire_get_value(idimports); Module.hiwire_decref(idimports); - var internal = function(resolve, reject) { + var internal = function(resolve, reject) + { try { resolve(Module._runPythonInternal(pycode)); } catch (e) { @@ -86,19 +87,21 @@ EM_JS(int, runpython_init_js, (), { }; if (jsimports.length) { - var packageNames = window.pyodide._module.packages.import_name_to_package_name; + var packageNames = + window.pyodide._module.packages.import_name_to_package_name; var packages = {}; for (var i = 0; i < jsimports.length; ++i) { var name = jsimports[i]; + // clang-format off if (packageNames[name] !== undefined) { + // clang-format on packages[packageNames[name]] = undefined; } } if (Object.keys(packages).length) { - var runInternal = function() { - return new Promise(internal); - }; - return Module.loadPackage(Object.keys(packages), messageCallback).then(runInternal); + var runInternal = function() { return new Promise(internal); }; + return Module.loadPackage(Object.keys(packages), messageCallback) + .then(runInternal); } } return new Promise(internal);