-
Notifications
You must be signed in to change notification settings - Fork 293
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
Use "# %%" instead of "#%%" as default cell delimiter (or allow customization) #2991
Comments
Thanks. Seems like an easy change that shouldn't really affect anything negatively. |
Do you think it would be desirable to add a customization option? I don't think it's really that useful but OTOH it seems weird to me having a customizable regex to match an uncustomizable marker. Maybe this option should be removed instead of the other one added? |
The marker is customizable, just not the one that we output at the end. We should probably have the setting too then, otherwise in the case where somebody is actually customizing the regex for matching, shift+enter won't work correctly. We'll check telemetry first though to see how many people have changed the regex. |
For all the hate that telemetry gets, it's great that you can do that kind of "data-driven development". |
I think microsoft/vscode-python#7782 is the right move. 👍 @memeplex Just for the record though, at least for
|
Validated. |
By default the extension inserts
#%%
after executing the last cell in a file. This is also the documented cell delimiter. But it's not compliant with flake8 and other popular python linters, which expect at least one whitespace after the#
. In general, it's not possible to configure these linters to ignore a specific pattern, but just to disable predefined rules. I understand that exploratory work often violates conventions and produces "write-only" code. But I believe that changing the default delimiter to# %%
is a simple change that will keep flake8 from flooding the problems view. You could maybe offer the option to change this default delimiter, given that you already offer the option to change the delimiter regex (which by default is also compatible with# %%
)..The text was updated successfully, but these errors were encountered: