Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/2 Fixes/2281.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix error when switching from new language server to the old `Jedi` language server.
4 changes: 2 additions & 2 deletions src/client/activation/languageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class LanguageServerExtensionActivator implements IExtensionActivator {

this.surveyBanner = services.get<IPythonExtensionBanner>(IPythonExtensionBanner, BANNER_NAME_LS_SURVEY);

(this.configuration.getSettings() as PythonSettings).addListener('change', this.onSettingsChanged);
(this.configuration.getSettings() as PythonSettings).addListener('change', this.onSettingsChanged.bind(this));
}

public async activate(): Promise<boolean> {
Expand All @@ -112,7 +112,7 @@ export class LanguageServerExtensionActivator implements IExtensionActivator {
for (const d of this.disposables) {
d.dispose();
}
(this.configuration.getSettings() as PythonSettings).removeListener('change', this.onSettingsChanged);
(this.configuration.getSettings() as PythonSettings).removeListener('change', this.onSettingsChanged.bind(this));
}

private async startLanguageServer(clientOptions: LanguageClientOptions): Promise<boolean> {
Expand Down
9 changes: 5 additions & 4 deletions src/client/unittests/pytest/services/argsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const OptionsWithoutArguments = ['--cache-clear', '--cache-show', '--collect-in-
'--no-print-logs', '--noconftest', '--old-summary', '--pdb', '--pyargs', '-PyTest, Unittest-pyargs',
'--quiet', '--runxfail', '--setup-only', '--setup-plan', '--setup-show', '--showlocals',
'--strict', '--trace-config', '--verbose', '--version', '-h', '-l', '-q', '-s', '-v', '-x',
'--boxed', '--forked', '--looponfail', '--tx', '-d'];
'--boxed', '--forked', '--looponfail', '--trace', '--tx', '-d'];

@injectable()
export class ArgumentsService implements IArgumentsService {
Expand Down Expand Up @@ -92,7 +92,7 @@ export class ArgumentsService implements IArgumentsService {
'-l', '--showlocals',
'--no-print-logs',
'--debug',
'--setup-only', '--setup-show', '--setup-plan'
'--setup-only', '--setup-show', '--setup-plan', '--trace'
]);
optionsWithArgsToRemove.push(...[
'-m', '--maxfail',
Expand All @@ -111,7 +111,7 @@ export class ArgumentsService implements IArgumentsService {
}
case TestFilter.debugAll:
case TestFilter.runAll: {
optionsWithoutArgsToRemove.push('--collect-only');
optionsWithoutArgsToRemove.push(...['--collect-only', '--trace']);
break;
}
case TestFilter.debugSpecific:
Expand All @@ -120,7 +120,8 @@ export class ArgumentsService implements IArgumentsService {
'--collect-only',
'--lf', '--last-failed',
'--ff', '--failed-first',
'--nf', '--new-first'
'--nf', '--new-first',
'--trace'
]);
optionsWithArgsToRemove.push(...[
'-k', '-m',
Expand Down