Skip to content

Commit

Permalink
Do not use deprecated poetry --dev option for installing packages (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
SaidBySolo authored and wesm committed Mar 28, 2024
1 parent 772f9bf commit a67662c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class PoetryInstaller extends ModuleInstaller {

protected async getExecutionInfo(moduleName: string, resource?: InterpreterUri): Promise<ExecutionInfo> {
const execPath = this.configurationService.getSettings(isResource(resource) ? resource : undefined).poetryPath;
const args = ['add', '--dev', moduleName];
const args = ['add', '--group', 'dev', moduleName];
if (moduleName === 'black') {
args.push('--allow-prereleases');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ suite('Module Installer - Poetry', () => {

const info = await poetryInstaller.getExecutionInfo('something', uri);

assert.deepEqual(info, { args: ['add', '--dev', 'something'], execPath: 'poetry path' });
assert.deepEqual(info, { args: ['add', '--group', 'dev', 'something'], execPath: 'poetry path' });
});
test('Get executable info when installing black', async () => {
const uri = Uri.file(__dirname);
Expand All @@ -115,7 +115,7 @@ suite('Module Installer - Poetry', () => {
const info = await poetryInstaller.getExecutionInfo('black', uri);

assert.deepEqual(info, {
args: ['add', '--dev', 'black', '--allow-prereleases'],
args: ['add', '--group', 'dev', 'black', '--allow-prereleases'],
execPath: 'poetry path',
});
});
Expand Down

0 comments on commit a67662c

Please sign in to comment.