Skip to content

.vscode/settings.json: Teach Pylance about our paths#3040

Merged
StephanTLavavej merged 1 commit into
microsoft:mainfrom
StephanTLavavej:vscode-python
Aug 18, 2022
Merged

.vscode/settings.json: Teach Pylance about our paths#3040
StephanTLavavej merged 1 commit into
microsoft:mainfrom
StephanTLavavej:vscode-python

Conversation

@StephanTLavavej
Copy link
Copy Markdown
Member

This tells VSCode's Python extension, Pylance, where to find our test support machinery, so that modules can be fully resolved without squiggles.

(I found these paths by the ultra-scientific method of opening all of our .py files, and seeing which modules generated squiggles. With these paths, only psutil needs to be installed locally in order to resolve one remaining squiggle.)

🐍

@StephanTLavavej StephanTLavavej added the test Related to test code label Aug 18, 2022
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner August 18, 2022 05:11
@StephanTLavavej StephanTLavavej self-assigned this Aug 18, 2022
@StephanTLavavej
Copy link
Copy Markdown
Member Author

I'm speculatively mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

(I am a bit of a greedy kitty for fast-tracking my own PR before anyone has seen it - but as usual it will be fully reviewed and either approved or held back before merging. 🍗 🐈)

Copy link
Copy Markdown
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

I don't personally know much about python, but this seems reasonable to me.

Comment thread .vscode/settings.json
Comment on lines +25 to +27
"./llvm-project/libcxx/utils",
"./llvm-project/llvm/utils/lit",
"./tests/utils"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason we're ./ing these paths? They're relative to the workspace folder anyways.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seems like it makes things more explicit, I don't mind this as a style choice

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was simply confused about whether ./ was necessary - I had tried a bunch of paths, added ./, then found something that worked and didn't think to try removing ./.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As everyone has approved, I'd like to avoid resetting testing and land this as-is, but I'll clean up the ./s in a followup PR since they weren't really an intentional style choice on my part.

@StephanTLavavej StephanTLavavej merged commit 20db59e into microsoft:main Aug 18, 2022
@StephanTLavavej StephanTLavavej deleted the vscode-python branch August 18, 2022 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Related to test code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants