-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Python side of hiding interpreter for native notebooks #15149
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,11 +47,10 @@ import { | |
| IInterpreterHelper, | ||
| IInterpreterLocatorProgressHandler, | ||
| IInterpreterService, | ||
| IInterpreterStatusbarVisibilityFilter, | ||
| IInterpreterVersionService, | ||
| IShebangCodeLensProvider, | ||
| } from './contracts'; | ||
| import { AlwaysDisplayStatusBar, InterpreterDisplay } from './display'; | ||
| import { InterpreterDisplay } from './display'; | ||
| import { InterpreterSelectionTip } from './display/interpreterSelectionTip'; | ||
| import { InterpreterLocatorProgressStatubarHandler } from './display/progressDisplay'; | ||
| import { ShebangCodeLensProvider } from './display/shebangCodeLensProvider'; | ||
|
|
@@ -164,10 +163,6 @@ export function registerInterpreterTypes(serviceManager: IServiceManager) { | |
| IExtensionSingleActivationService, | ||
| PreWarmActivatedEnvironmentVariables, | ||
| ); | ||
| serviceManager.addSingleton<IInterpreterStatusbarVisibilityFilter>( | ||
| IInterpreterStatusbarVisibilityFilter, | ||
| AlwaysDisplayStatusBar, | ||
| ); | ||
|
Comment on lines
-167
to
-170
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I've understood correctly, this can go away because it has no effect on the behavior of
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it was really a no-op or a placeholder. Now that I've changed the way we inject the filters, it's not needed anymore. |
||
| } | ||
|
|
||
| export function registerTypes(serviceManager: IServiceManager) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,7 +117,8 @@ suite('Interpreters Display', () => { | |
| createInterpreterDisplay(); | ||
| }); | ||
| function createInterpreterDisplay(filters: IInterpreterStatusbarVisibilityFilter[] = []) { | ||
| interpreterDisplay = new InterpreterDisplay(serviceContainer.object, filters); | ||
| interpreterDisplay = new InterpreterDisplay(serviceContainer.object); | ||
| filters.forEach((f) => interpreterDisplay.registerVisibilityFilter(f)); | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current unit tests should test this same concept. |
||
| } | ||
| function setupWorkspaceFolder(resource: Uri, workspaceFolder?: Uri) { | ||
| if (workspaceFolder) { | ||
|
|
||
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.
Instead of filters coming from the DI container, they're now added at runtime. This will allow the jupyter extension (or other code in the python extension) to provide a filter.