Skip to content

Sync with template: expand get_cwd() variable substitution and add tests#404

Merged
edvilme merged 2 commits intomainfrom
sync/template-pr-260-262-5bb0686c9f24e66d
Feb 27, 2026
Merged

Sync with template: expand get_cwd() variable substitution and add tests#404
edvilme merged 2 commits intomainfrom
sync/template-pr-260-262-5bb0686c9f24e66d

Conversation

@edvilme
Copy link
Contributor

@edvilme edvilme commented Feb 27, 2026

Applies changes from upstream template PRs:

Expands get_cwd() to resolve nine VS Code file-related variables: ${file}, ${fileBasename}, ${fileBasenameNoExtension}, ${fileExtname}, ${fileDirname}, ${fileDirnameBasename}, ${relativeFile}, ${relativeFileDirname}, ${fileWorkspaceFolder}.

Adds 17 unit tests covering every variable, composite patterns, multi-variable strings, and no-document fallback behaviour.

Applies changes from upstream template PRs:
- microsoft/vscode-python-tools-extension-template#260 (cwd setting - already applied)
- microsoft/vscode-python-tools-extension-template#262 (get_cwd variable substitution)

Expands get_cwd() to resolve nine VS Code file-related variables:
${file}, ${fileBasename}, ${fileBasenameNoExtension}, ${fileExtname},
${fileDirname}, ${fileDirnameBasename}, ${relativeFile},
${relativeFileDirname}, ${fileWorkspaceFolder}.

Adds 17 unit tests covering every variable, composite patterns,
multi-variable strings, and no-document fallback behaviour.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme edvilme added bug Issue identified by VS Code Team member as probable bug debt labels Feb 27, 2026
@edvilme edvilme enabled auto-merge (squash) February 27, 2026 01:15
@edvilme
Copy link
Contributor Author

edvilme commented Feb 27, 2026

Fixes microsoft/vscode-isort#141

@github-actions github-actions bot mentioned this pull request Feb 27, 2026
Copy link
Contributor

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@edvilme edvilme merged commit d93d518 into main Feb 27, 2026
20 checks passed
@edvilme edvilme deleted the sync/template-pr-260-262-5bb0686c9f24e66d branch February 27, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue identified by VS Code Team member as probable bug debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants