Skip to content

Commit bba2562

Browse files
committed
fixed linter issues
1 parent 3671ccd commit bba2562

3 files changed

Lines changed: 10 additions & 20 deletions

File tree

src/client/debugger/DebugClients/NonDebugClient.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
import { BaseDebugServer } from "../DebugServers/BaseDebugServer";
22
import { NonDebugServer } from "../DebugServers/NonDebugServer";
3-
import { IPythonProcess, IPythonThread, IDebugServer } from "../Common/Contracts";
3+
import { IPythonProcess, IDebugServer } from "../Common/Contracts";
44
import { DebugSession, OutputEvent } from "vscode-debugadapter";
55
import { DebugProtocol } from "vscode-debugprotocol";
66
import * as path from "path";
77
import * as child_process from "child_process";
88
import { LaunchRequestArguments } from "../Common/Contracts";
99
import { DebugClient, DebugType } from "./DebugClient";
10-
import * as fs from "fs";
1110
import { open } from "../../common/open";
12-
let fsExtra = require("fs-extra");
13-
let tmp = require("tmp");
14-
let prependFile = require("prepend-file");
15-
let LineByLineReader = require("line-by-line");
1611

1712
export class NonDebugClient extends DebugClient {
1813
protected args: LaunchRequestArguments;
@@ -50,7 +45,6 @@ export class NonDebugClient extends DebugClient {
5045
if (typeof this.args.cwd === "string" && this.args.cwd.length > 0) {
5146
processCwd = this.args.cwd;
5247
}
53-
let fileNameWithoutPath = path.basename(this.args.program);
5448
let pythonPath = "python";
5549
if (typeof this.args.pythonPath === "string" && this.args.pythonPath.trim().length > 0) {
5650
pythonPath = this.args.pythonPath;
@@ -73,7 +67,6 @@ export class NonDebugClient extends DebugClient {
7367
environmentVariables["PYTHONIOENCODING"] = "UTF-8";
7468
newEnvVars["PYTHONIOENCODING"] = "UTF-8";
7569
}
76-
let currentFileName = module.filename;
7770
let launcherArgs = this.buildLauncherArguments();
7871

7972
let args = launcherArgs;
@@ -98,7 +91,6 @@ export class NonDebugClient extends DebugClient {
9891
const isSudo = Array.isArray(this.args.debugOptions) && this.args.debugOptions.some(opt => opt === 'Sudo');
9992
const command = isSudo ? 'sudo' : pythonPath;
10093
const commandArgs = isSudo ? [pythonPath].concat(args) : args;
101-
const options = { cwd: processCwd, env: environmentVariables };
10294
const termArgs: DebugProtocol.RunInTerminalRequestArguments = {
10395
kind: 'integrated',
10496
title: "Python Debug Console",
@@ -108,7 +100,7 @@ export class NonDebugClient extends DebugClient {
108100
};
109101
this.debugSession.runInTerminalRequest(termArgs, 5000, (response) => {
110102
if (response.success) {
111-
resolve()
103+
resolve();
112104
} else {
113105
reject(response);
114106
}
@@ -118,7 +110,7 @@ export class NonDebugClient extends DebugClient {
118110

119111
this.pyProc = child_process.spawn(pythonPath, args, { cwd: processCwd, env: environmentVariables });
120112
this.pyProc.on("error", error => {
121-
this.debugSession.sendEvent(new OutputEvent(error, "stderr"));
113+
this.debugSession.sendEvent(new OutputEvent(error + '', "stderr"));
122114
});
123115
this.pyProc.stderr.setEncoding("utf8");
124116
this.pyProc.stdout.setEncoding("utf8");

src/client/debugger/DebugClients/RemoteDebugClient.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import {BaseDebugServer} from "../DebugServers/BaseDebugServer";
2-
import {RemoteDebugServer} from "../DebugServers/RemoteDebugServer";
3-
import {IPythonProcess, IPythonThread, IDebugServer} from "../Common/Contracts";
4-
import {DebugSession, OutputEvent} from "vscode-debugadapter";
5-
import * as path from "path";
6-
import * as child_process from "child_process";
7-
import {AttachRequestArguments} from "../Common/Contracts";
8-
import {DebugClient, DebugType} from "./DebugClient";
1+
import { BaseDebugServer } from "../DebugServers/BaseDebugServer";
2+
import { RemoteDebugServer } from "../DebugServers/RemoteDebugServer";
3+
import { IPythonProcess } from "../Common/Contracts";
4+
import { DebugSession } from "vscode-debugadapter";
5+
import { AttachRequestArguments } from "../Common/Contracts";
6+
import { DebugClient, DebugType } from "./DebugClient";
97

108
export class RemoteDebugClient extends DebugClient {
119
private args: AttachRequestArguments;

src/client/providers/jediProxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function spawnProcess(dir: string) {
223223
logger.error('spawnProcess.end', "End - " + end);
224224
});
225225
proc.on("error", error => {
226-
handleError("error", error);
226+
handleError("error", error + '');
227227
});
228228
proc.stdout.setEncoding('utf8');
229229
proc.stdout.on("data", (data: string) => {

0 commit comments

Comments
 (0)