Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function run_formatter(
script: string,
uri: vscode.Uri,
callback: (result: string[] | undefined) => void
) {
let options = PythonShell.defaultOptions;
options.scriptPath = SCRIPT_PATH;
const pythonPath: string | undefined = vscode.workspace
.getConfiguration("python")
.get("pythonPath");
if (!!pythonPath) {
options.pythonPath = pythonPath;
}
let input = script;
options.args = PY_ARGS;
options.args[0] = input;
PythonShell.run(SCRIPT_NAME, options, (err, results) => {
if (err) {