Skip to content

Commit b3085df

Browse files
committed
fix(vscode): write mypy settings at ws scope
v0.4.18 applyAllocatorSetting wrote mypy.dmypyExecutable and mypy.runUsingActiveInterpreter at WorkspaceFolder scope, the only writes in the module not using Workspace scope. When the window is opened via a .code-workspace file (where these keys and cmk.mypy.allocator already live), the folder-scoped update is rejected, so the reconcile threw and surfaced as "re-apply failed". The previous weOwn guard masked it by short-circuiting before the write; removing that guard made the write unconditional and exposed the failure. Write at Workspace scope to match the allocator setting and the user's existing values. CMK-36081 Change-Id: Ib0609b8a1e619263603892f98f6d8f4f2430bca6
1 parent ea0fb7a commit b3085df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.ide/vscode/src/profiles/python/jemallocAllocator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ async function updateDmypyExecutable(
184184
): Promise<void> {
185185
await vscode.workspace
186186
.getConfiguration('mypy', wsFolder)
187-
.update(DMYPY_SETTING, value, vscode.ConfigurationTarget.WorkspaceFolder)
187+
.update(DMYPY_SETTING, value, vscode.ConfigurationTarget.Workspace)
188188
}
189189

190190
async function updateRunUsingInterpreter(
@@ -193,7 +193,7 @@ async function updateRunUsingInterpreter(
193193
): Promise<void> {
194194
await vscode.workspace
195195
.getConfiguration('mypy', wsFolder)
196-
.update(RUN_USING_INTERPRETER_SETTING, value, vscode.ConfigurationTarget.WorkspaceFolder)
196+
.update(RUN_USING_INTERPRETER_SETTING, value, vscode.ConfigurationTarget.Workspace)
197197
}
198198

199199
function openInstallTerminal(install: InstallCommand): void {

0 commit comments

Comments
 (0)