@@ -42,7 +42,7 @@ export function isDefaultEnvManagerBroken(): boolean {
4242}
4343
4444export function getDefaultEnvManagerSetting ( wm : PythonProjectManager , scope ?: Uri ) : string {
45- const config = workspace . getConfiguration ( 'python-envs' , scope ) ;
45+ const config = getConfiguration ( 'python-envs' , scope ) ;
4646 const settings = getSettings ( wm , config , scope ) ;
4747 if ( settings && settings . envManager . length > 0 ) {
4848 return settings . envManager ;
@@ -69,7 +69,7 @@ export function getDefaultPkgManagerSetting(
6969 scope ?: ConfigurationScope | null ,
7070 defaultId ?: string ,
7171) : string {
72- const config = workspace . getConfiguration ( 'python-envs' , scope ) ;
72+ const config = getConfiguration ( 'python-envs' , scope ) ;
7373
7474 const settings = getSettings ( wm , config , scope ) ;
7575 if ( settings && settings . packageManager . length > 0 ) {
@@ -127,7 +127,7 @@ export async function setAllManagerSettings(edits: EditAllManagerSettings[]): Pr
127127 const promises : Thenable < void > [ ] = [ ] ;
128128
129129 workspaces . forEach ( ( es , w ) => {
130- const config = workspace . getConfiguration ( 'python-envs' , w ) ;
130+ const config = getConfiguration ( 'python-envs' , w ) ;
131131 const overrides = config . get < PythonProjectSettings [ ] > ( 'pythonProjects' , [ ] ) ;
132132 const projectsInspect = config . inspect < PythonProjectSettings [ ] > ( 'pythonProjects' ) ;
133133 const existingProjectsSetting =
@@ -192,7 +192,7 @@ export async function setAllManagerSettings(edits: EditAllManagerSettings[]): Pr
192192 }
193193 } ) ;
194194
195- const config = workspace . getConfiguration ( 'python-envs' , undefined ) ;
195+ const config = getConfiguration ( 'python-envs' , undefined ) ;
196196 edits
197197 . filter ( ( e ) => ! e . project )
198198 . forEach ( ( e ) => {
@@ -253,7 +253,7 @@ export async function setEnvironmentManager(edits: EditEnvManagerSettings[]): Pr
253253 const promises : Thenable < void > [ ] = [ ] ;
254254
255255 workspaces . forEach ( ( es , w ) => {
256- const config = workspace . getConfiguration ( 'python-envs' , w . uri ) ;
256+ const config = getConfiguration ( 'python-envs' , w . uri ) ;
257257 const overrides = config . get < PythonProjectSettings [ ] > ( 'pythonProjects' , [ ] ) ;
258258 const projectsInspect = config . inspect < PythonProjectSettings [ ] > ( 'pythonProjects' ) ;
259259 const existingProjectsSetting = projectsInspect ?. workspaceValue ?? undefined ;
@@ -285,7 +285,7 @@ export async function setEnvironmentManager(edits: EditEnvManagerSettings[]): Pr
285285 }
286286 } ) ;
287287
288- const config = workspace . getConfiguration ( 'python-envs' , undefined ) ;
288+ const config = getConfiguration ( 'python-envs' , undefined ) ;
289289 edits
290290 . filter ( ( e ) => ! e . project )
291291 . forEach ( ( e ) => {
@@ -337,7 +337,7 @@ export async function setPackageManager(edits: EditPackageManagerSettings[]): Pr
337337 const promises : Thenable < void > [ ] = [ ] ;
338338
339339 workspaces . forEach ( ( es , w ) => {
340- const config = workspace . getConfiguration ( 'python-envs' , w . uri ) ;
340+ const config = getConfiguration ( 'python-envs' , w . uri ) ;
341341 const overrides = config . get < PythonProjectSettings [ ] > ( 'pythonProjects' , [ ] ) ;
342342 const projectsInspect = config . inspect < PythonProjectSettings [ ] > ( 'pythonProjects' ) ;
343343 const existingProjectsSetting = projectsInspect ?. workspaceValue ?? undefined ;
@@ -374,7 +374,7 @@ export async function setPackageManager(edits: EditPackageManagerSettings[]): Pr
374374 }
375375 } ) ;
376376
377- const config = workspace . getConfiguration ( 'python-envs' , undefined ) ;
377+ const config = getConfiguration ( 'python-envs' , undefined ) ;
378378 edits
379379 . filter ( ( e ) => ! e . project )
380380 . forEach ( ( e ) => {
@@ -403,7 +403,7 @@ export interface EditProjectSettings {
403403export async function addPythonProjectSetting ( edits : EditProjectSettings [ ] ) : Promise < void > {
404404 const noWorkspace : EditProjectSettings [ ] = [ ] ;
405405 const workspaces = new Map < WorkspaceFolder , EditProjectSettings [ ] > ( ) ;
406- const globalConfig = workspace . getConfiguration ( 'python-envs' , undefined ) ;
406+ const globalConfig = getConfiguration ( 'python-envs' , undefined ) ;
407407 const envManager = globalConfig . get < string > ( 'defaultEnvManager' , DEFAULT_ENV_MANAGER_ID ) ;
408408 const pkgManager = globalConfig . get < string > ( 'defaultPackageManager' , DEFAULT_PACKAGE_MANAGER_ID ) ;
409409
@@ -424,7 +424,7 @@ export async function addPythonProjectSetting(edits: EditProjectSettings[]): Pro
424424
425425 const promises : Thenable < void > [ ] = [ ] ;
426426 workspaces . forEach ( ( es , w ) => {
427- const config = workspace . getConfiguration ( 'python-envs' , w . uri ) ;
427+ const config = getConfiguration ( 'python-envs' , w . uri ) ;
428428 const overrides = config . get < PythonProjectSettings [ ] > ( 'pythonProjects' , [ ] ) ;
429429 es . forEach ( ( e ) => {
430430 if ( isMultiroot ) {
@@ -472,7 +472,7 @@ export async function removePythonProjectSetting(edits: EditProjectSettings[]):
472472
473473 const promises : Thenable < void > [ ] = [ ] ;
474474 workspaces . forEach ( ( es , w ) => {
475- const config = workspace . getConfiguration ( 'python-envs' , w . uri ) ;
475+ const config = getConfiguration ( 'python-envs' , w . uri ) ;
476476 const overrides = config . get < PythonProjectSettings [ ] > ( 'pythonProjects' , [ ] ) ;
477477 es . forEach ( ( e ) => {
478478 const pwPath = path . normalize ( e . project . uri . fsPath ) ;
0 commit comments