Change the default cell marker#7782
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7782 +/- ##
==========================================
- Coverage 59.17% 59.16% -0.02%
==========================================
Files 498 498
Lines 22245 22254 +9
Branches 3573 3578 +5
==========================================
+ Hits 13164 13166 +2
- Misses 8259 8264 +5
- Partials 822 824 +2
Continue to review full report at Codecov.
|
| export const ChangeDirectory = ['{0}', '{1}', 'import os', 'try:', '\tos.chdir(os.path.join(os.getcwd(), \'{2}\'))', '\tprint(os.getcwd())', 'except:', '\tpass', '']; | ||
| export const ChangeDirectoryCommentIdentifier = '# ms-python.python added'; // Not translated so can compare. | ||
| export const ImportIPython = '#%%\nfrom IPython import get_ipython\n\n'; | ||
| export const ImportIPython = '{0}\nfrom IPython import get_ipython\n\n{1}'; |
There was a problem hiding this comment.
Why is there a second parameter here?
There was a problem hiding this comment.
When this is used it's concatenated with another string.
In reply to: 331724874 [](ancestors = 331724874)
| "DataScience.exportCancel": "Cancel", | ||
| "Common.canceled": "Canceled", | ||
| "DataScience.importChangeDirectoryComment": "#%% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataScience.changeDirOnImportExport setting", | ||
| "DataScience.importChangeDirectoryComment": "# %% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataScience.changeDirOnImportExport setting", |
There was a problem hiding this comment.
Shouldn't we remove this as well. I.e. if tomorrow a user wants the default to be #%%, it wont work everywhere as its hardcoded here.
I.e. use string.format as we've done in other places.
There was a problem hiding this comment.
| "DataScience.jupyterDebuggerInstallPtvsdNo": "No", | ||
| "DataScience.cellStopOnErrorFormatMessage": "{0} cells were canceled due to an error in the previous cell.", | ||
| "DataScience.instructionComments": "# To add a new cell, type '#%%'\n# To add a new markdown cell, type '#%% [markdown]'\n", | ||
| "DataScience.instructionComments": "# To add a new cell, type '# %%'\n# To add a new markdown cell, type '# %% [markdown]'\n", |
There was a problem hiding this comment.
Same question as earlier, string.format to not hardcode # %%
Fix gather to use new comment Fix formatting on code comments from nls
* Change the default cell marker * Fix test failures Fix gather to use new comment Fix formatting on code comments from nls * Fix unit test too * Fix gather to replace #%%
For #7674