Skip to content

Commit 235f633

Browse files
committed
formatting and remove unneeded comment
1 parent fa47796 commit 235f633

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/features/envCommands.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,6 @@ export async function copyPathToClipboard(item: unknown): Promise<void> {
637637
await clipboardWriteText(projectPath);
638638
traceInfo(`Copied project path to clipboard: ${projectPath}`);
639639
} else if (item instanceof ProjectEnvironment || item instanceof PythonEnvTreeItem) {
640-
// For copying interpreter path, we want the actual executable path, not the full command
641640
const run = item.environment.execInfo.run;
642641
const envPath = run.executable;
643642
await clipboardWriteText(envPath);

src/test/features/commands/copyPathToClipboard.unit.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import * as sinon from 'sinon';
2+
import { Uri } from 'vscode';
3+
import { PythonEnvironment } from '../../../api';
24
import * as envApis from '../../../common/env.apis';
35
import { copyPathToClipboard } from '../../../features/envCommands';
46
import {
5-
ProjectItem,
7+
EnvManagerTreeItem,
68
ProjectEnvironment,
9+
ProjectItem,
710
PythonEnvTreeItem,
8-
EnvManagerTreeItem,
911
} from '../../../features/views/treeViewItems';
10-
import { Uri } from 'vscode';
11-
import { PythonEnvironment } from '../../../api';
1212
import { InternalEnvironmentManager } from '../../../internal.api';
1313

1414
suite('Copy Path To Clipboard', () => {
@@ -73,12 +73,12 @@ suite('Copy Path To Clipboard', () => {
7373
name: 'base',
7474
displayName: 'base (3.12.2)',
7575
displayPath: '/opt/conda/envs/base',
76-
execInfo: {
76+
execInfo: {
7777
run: { executable: '/opt/conda/envs/base/bin/python' },
7878
activatedRun: {
7979
executable: 'conda',
8080
args: ['run', '--name', 'base', 'python'],
81-
}
81+
},
8282
},
8383
} as PythonEnvironment,
8484
new EnvManagerTreeItem({ name: 'conda', id: 'conda' } as InternalEnvironmentManager),
@@ -98,12 +98,12 @@ suite('Copy Path To Clipboard', () => {
9898
name: 'myenv',
9999
displayName: 'myenv (3.11.5)',
100100
displayPath: '/opt/conda/envs/myenv',
101-
execInfo: {
101+
execInfo: {
102102
run: { executable: '/opt/conda/envs/myenv/bin/python' },
103103
activatedRun: {
104104
executable: 'conda',
105105
args: ['run', '--prefix', '/opt/conda/envs/myenv', 'python'],
106-
}
106+
},
107107
},
108108
} as PythonEnvironment,
109109
new EnvManagerTreeItem({ name: 'conda', id: 'conda' } as InternalEnvironmentManager),

0 commit comments

Comments
 (0)