microsoft / microsoft/vscode-flake8
Template Sync: align importStrategy in typescript to python
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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