microsoft / microsoft/vscode-flake8

Template Sync: align importStrategy in typescript to python

Open Beginner friendly
#441 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
52
Forks
34
Avg merge
1d 1h
Merged PRs (30d)
5

Description

### 🔄 Template Sync Required

Changes from the upstream [vscode-python-tools-extension-template](https://github.com/microsoft/vscode-python-tools-extension-template) have not yet been incorporated into this repository.

#### Source PR
- microsoft/vscode-python-tools-extension-template#158 — align importStrategy in typescript to python

#### Summary
The template updated the default value of `importStrategy` in `getGlobalSettings()` from `'fromEnvironment'` to `'useBundled'` in `src/common/settings.ts`, to align with the `useBundled` default used in `getWorkspaceSettings()` and in `package.json`. In this repository, `getWorkspaceSettings()` already uses `'useBundled'` as the default (already synced), but `getGlobalSettings()` still falls back to `'fromEnvironment'`.

#### Files with missing changes

- **`src/common/settings.ts`**: In `getGlobalSettings()`, line 153, the `importStrategy` fallback default is still `'fromEnvironment'` instead of `'useBundled'`:
```ts
importStrategy: getGlobalValue(string)(config, 'importStrategy', 'fromEnvironment'),
```
This is inconsistent with the workspace settings default (`'useBundled'`) and with the `package.json` schema default (`"useBundled"`).

#### Suggested fix

````diff
--- a/src/common/settings.ts
+++ b/src/common/settings.ts
@@ -150,7 +150,7 @@ export async function getGlobalSettings(namespace: string, includeInterpreter?:
interpreter: interpreter ?? [],
- importStrategy: getGlobalValue(string)(config, 'importStrategy', 'fromEnvironment'),
+ importStrategy: getGlobalValue(string)(config, 'importStrategy', 'useBundled'),
showNotifications: getGlobalValue(string)(config, 'showNotifications', 'off'),
};
````

#### Files skipped

- `package.json`: The `flake8.importStrategy` default is already `"useBundled"` in this repository — no change needed.

---
🤖 This issue was auto-generated by the [`extension-template-sync`](.github/workflows/extension-template-sync.yml) workflow.

> Generated by [Extension Template Sync](https://github.com/microsoft/vscode-flake8/actions/runs/23098830838) · [◷](https://github.com/search?q=repo%3Amicrosoft%2Fvscode-flake8+is%3Aissue+%22gh-aw-workflow-call-id%3A+microsoft%2Fvscode-flake8%2FExtension+Template+Sync%22&type=issues)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open src/common/settings.ts and inspect getGlobalSettings(), comparing its importStrategy fallback with getWorkspaceSettings() and the package.json schema default. The issue is complete when the global fallback consistently uses useBundled and the repository’s relevant checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.