Skip to content

Commit d3a17a0

Browse files
jaboothDonJayamanne
authored andcommitted
Use constants in activation of commands
1 parent e4b9a46 commit d3a17a0

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/client/providers/execInTerminalProvider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"use strict";
22
import * as vscode from "vscode";
3-
import * as settings from "./../common/configSettings";
3+
import * as settings from "../common/configSettings";
4+
import { Commands } from '../common/constants';
45

56
export function activateExecInTerminalProvider() {
6-
vscode.commands.registerCommand("python.execInTerminal", execInTerminal);
7+
vscode.commands.registerCommand(Commands.Exec_In_Terminal, execInTerminal);
78
}
89

910
function execInTerminal(fileUri?: vscode.Uri) {

src/client/providers/setInterpreterProvider.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import * as child_process from 'child_process';
33
import * as path from "path";
44
import * as fs from "fs";
55
import * as vscode from "vscode";
6-
import * as settings from "./../common/configSettings";
7-
import * as utils from "./../common/utils";
6+
import * as settings from "../common/configSettings";
7+
import { Commands } from '../common/constants';
8+
import * as utils from "../common/utils";
89
let ncp = require("copy-paste");
910

1011
// where to find the Python binary within a conda env
@@ -72,7 +73,7 @@ function replaceContentsOfFile(doc: vscode.TextDocument, newContent: string) {
7273
}
7374

7475
export function activateSetInterpreterProvider() {
75-
vscode.commands.registerCommand("python.setInterpreter", setInterpreter);
76+
vscode.commands.registerCommand(Commands.Set_Interpreter, setInterpreter);
7677
}
7778

7879
function lookForInterpretersInPath(pathToCheck: string): Promise<string[]> {

0 commit comments

Comments
 (0)