-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Ensure workspace pipenv
environment is not labeled as a virtual env
#2239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A title called "WIP" does not warrant a summary of what is changing, hence I took back a ✔️ 😉 |
Codecov Report
@@ Coverage Diff @@
## master #2239 +/- ##
==========================================
+ Coverage 79.82% 79.87% +0.05%
==========================================
Files 310 310
Lines 14367 14379 +12
Branches 2549 2552 +3
==========================================
+ Hits 11468 11485 +17
+ Misses 2887 2882 -5
Partials 12 12
Continue to review full report at Codecov.
|
pipenv
environment is not labeled as a virtual env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - I made couple of comments.
@@ -25,7 +24,8 @@ export class PythonInstaller { | |||
const interpreters = await this.locator.getInterpreters(); | |||
if (interpreters.length > 0) { | |||
const platform = this.serviceContainer.get<IPlatformService>(IPlatformService); | |||
if (platform.isMac && isMacDefaultPythonPath(settings.pythonPath)) { | |||
const helper = this.serviceContainer.get<IInterpreterHelper>(IInterpreterHelper); | |||
if (platform.isMac && helper.isMacDefaultPythonPath(settings.pythonPath)) { | |||
const interpreterService = this.serviceContainer.get<IInterpreterService>(IInterpreterService); | |||
const interpreter = await interpreterService.getActiveInterpreter(); | |||
if (interpreter && interpreter.type === InterpreterType.Unknown) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷♂️ I know this isn't technically part of this review, but could we add a link to a post about why this isn't recommended? Or perhaps a link to an article explaining how to add Python to Mac? 🤷♀️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We document it at https://code.visualstudio.com/docs/python/environments and give instructions at https://code.visualstudio.com/docs/python/python-tutorial .
@@ -116,7 +116,7 @@ export class InterpreterService implements Disposable, IInterpreterService { | |||
virtualEnvManager.getEnvironmentName(pythonPath), | |||
virtualEnvManager.getEnvironmentType(pythonPath) | |||
]); | |||
if (details) { | |||
if (!details) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Would be interesting to see a test for this...
Fixes #2223
"1.2.3"
, not"^1.2.3"
)package-lock.json
has been regenerated if dependencies have changed