diff --git a/news/2 Fixes/6842.md b/news/2 Fixes/6842.md new file mode 100644 index 000000000000..72ad63989b4b --- /dev/null +++ b/news/2 Fixes/6842.md @@ -0,0 +1 @@ +Changed the name of the setting 'Run Magic Commands' to 'Run Startup Commands' to avoid confusion. \ No newline at end of file diff --git a/package.json b/package.json index 879f50f15088..a1c6dba2ffaf 100644 --- a/package.json +++ b/package.json @@ -2338,7 +2338,7 @@ "description": "Uncomment shell assignments (#!), line magic (#!%) and cell magic (#!%%) when parsing code cells.", "scope": "resource" }, - "python.dataScience.runMagicCommands": { + "python.dataScience.runStartupCommands": { "type": "string", "default": "", "description": "A series of Python instructions that will be executed when the interactive window loads.", diff --git a/src/client/common/types.ts b/src/client/common/types.ts index 82381e14dcfd..4ad2c5c0a681 100644 --- a/src/client/common/types.ts +++ b/src/client/common/types.ts @@ -341,7 +341,7 @@ export interface IDataScienceSettings { remoteDebuggerPort?: number; colorizeInputBox?: boolean; addGotoCodeLenses?: boolean; - runMagicCommands: string; + runStartupCommands: string; debugJustMyCode: boolean; } diff --git a/src/client/datascience/interactive-window/interactiveWindow.ts b/src/client/datascience/interactive-window/interactiveWindow.ts index 5434bfd25824..250598bbdf7b 100644 --- a/src/client/datascience/interactive-window/interactiveWindow.ts +++ b/src/client/datascience/interactive-window/interactiveWindow.ts @@ -149,8 +149,8 @@ export class InteractiveWindow extends WebViewHost im this.loadPromise = this.load(); const settings = this.configuration.getSettings(); - if (settings.datascience.runMagicCommands) { - this.addCode(settings.datascience.runMagicCommands, Identifiers.EmptyFileName, 0).ignoreErrors(); + if (settings.datascience.runStartupCommands) { + this.addCode(settings.datascience.runStartupCommands, Identifiers.EmptyFileName, 0).ignoreErrors(); } // For each listener sign up for their post events diff --git a/src/datascience-ui/react-common/settingsReactSide.ts b/src/datascience-ui/react-common/settingsReactSide.ts index 8c38a165a40b..2dfb4cec9b48 100644 --- a/src/datascience-ui/react-common/settingsReactSide.ts +++ b/src/datascience-ui/react-common/settingsReactSide.ts @@ -73,7 +73,7 @@ function load() { wordBasedSuggestions: true, parameterHintsEnabled: true }, - runMagicCommands: '', + runStartupCommands: '', debugJustMyCode: true }; } diff --git a/src/test/datascience/color.test.ts b/src/test/datascience/color.test.ts index 8f6a4386bd92..914e618cf4dc 100644 --- a/src/test/datascience/color.test.ts +++ b/src/test/datascience/color.test.ts @@ -70,7 +70,7 @@ suite('Theme colors', () => { codeRegularExpression: '^(#\\s*%%|#\\s*\\|#\\s*In\\[\\d*?\\]|#\\s*In\\[ \\])', markdownRegularExpression: '^(#\\s*%%\\s*\\[markdown\\]|#\\s*\\)', enablePlotViewer: true, - runMagicCommands: '', + runStartupCommands: '', debugJustMyCode: true }; configService = TypeMoq.Mock.ofType(); diff --git a/src/test/datascience/dataScienceIocContainer.ts b/src/test/datascience/dataScienceIocContainer.ts index 8deab04c785b..a4d3bbd5601b 100644 --- a/src/test/datascience/dataScienceIocContainer.ts +++ b/src/test/datascience/dataScienceIocContainer.ts @@ -432,7 +432,7 @@ export class DataScienceIocContainer extends UnitTestIocContainer { stopOnError: true, addGotoCodeLenses: true, enableCellCodeLens: true, - runMagicCommands: '', + runStartupCommands: '', debugJustMyCode: true }; diff --git a/src/test/datascience/editor-integration/codewatcher.unit.test.ts b/src/test/datascience/editor-integration/codewatcher.unit.test.ts index f3832aff5d7b..420a09e6cfe6 100644 --- a/src/test/datascience/editor-integration/codewatcher.unit.test.ts +++ b/src/test/datascience/editor-integration/codewatcher.unit.test.ts @@ -92,7 +92,7 @@ suite('DataScience Code Watcher Unit Tests', () => { markdownRegularExpression: '^(#\\s*%%\\s*\\[markdown\\]|#\\s*\\)', enableCellCodeLens: true, enablePlotViewer: true, - runMagicCommands: '', + runStartupCommands: '', debugJustMyCode: true }; debugService.setup(d => d.activeDebugSession).returns(() => undefined); diff --git a/src/test/datascience/execution.unit.test.ts b/src/test/datascience/execution.unit.test.ts index d47c53f6df8e..921e74ca5c79 100644 --- a/src/test/datascience/execution.unit.test.ts +++ b/src/test/datascience/execution.unit.test.ts @@ -558,7 +558,7 @@ suite('Jupyter Execution', async () => { markdownRegularExpression: '^(#\\s*%%\\s*\\[markdown\\]|#\\s*\\)', allowLiveShare: false, enablePlotViewer: true, - runMagicCommands: '', + runStartupCommands: '', debugJustMyCode: true }; diff --git a/src/test/datascience/interactiveWindowCommandListener.unit.test.ts b/src/test/datascience/interactiveWindowCommandListener.unit.test.ts index 5d892ebef6d9..fb91b0908f7c 100644 --- a/src/test/datascience/interactiveWindowCommandListener.unit.test.ts +++ b/src/test/datascience/interactiveWindowCommandListener.unit.test.ts @@ -151,7 +151,7 @@ suite('Interactive window command listener', async () => { markdownRegularExpression: '^(#\\s*%%\\s*\\[markdown\\]|#\\s*\\)', autoPreviewNotebooksInInteractivePane: true, enablePlotViewer: true, - runMagicCommands: '', + runStartupCommands: '', debugJustMyCode: true }; diff --git a/src/test/datascience/interactiveWindowTestHelpers.tsx b/src/test/datascience/interactiveWindowTestHelpers.tsx index c31edac91469..5065f04ba70a 100644 --- a/src/test/datascience/interactiveWindowTestHelpers.tsx +++ b/src/test/datascience/interactiveWindowTestHelpers.tsx @@ -324,7 +324,7 @@ export function defaultDataScienceSettings(): IDataScienceSettings { codeRegularExpression: '^(#\\s*%%|#\\s*\\|#\\s*In\\[\\d*?\\]|#\\s*In\\[ \\])', markdownRegularExpression: '^(#\\s*%%\\s*\\[markdown\\]|#\\s*\\)', enablePlotViewer: true, - runMagicCommands: '', + runStartupCommands: '', debugJustMyCode: true }; }