-
Notifications
You must be signed in to change notification settings - Fork 807
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
[isort] First implementation based on code_prettify #1204
Conversation
When you say 'works', in what sense have the ones youo've tried not worked? Or do you mean that you just can't find any more spare defaults? |
|
||
All options are provided by the [KerneExecOnCells library](kernel_exec_on_cell.js). There are a few nbextension-wide options, configurable using the [jupyter_nbextensions_configurator](https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator) or by editing the `notebook` section config file directly. The options are as follows: | ||
|
||
- `2to3.add_toolbar_button`: Whether to add a toolbar button to transform the selected cell(s). Defaults to `true`. |
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.
these options in the readme need 2to3
replacing with isort
input_type: text | ||
default: 'Sort imports with isort' | ||
|
||
- name: isort.show_alerts_for_errors |
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.
since you've caught all exceptions in the library function, this option might be better of not listed, since it won't actually do anything
Actually I didn't add keyboard shortcuts because I can't find any combination that works on my machine.
Thanks for your review @jcb91, I've amended the changes. |
Great, looks good to me 👍 @benjaminabel Could you also submit an equivalent PR to the upstream jfbercher/code_prettify? |
actually, no need, I'll do that... |
I didn't know existence about this repository. Why don't you include it as a git submodule? |
It more or less is already in practice, since they share history. I think you're probably right, it'd make sense to make this a submodule explicitly. Thoughts @jfbercher? |
@jcb91 Sorry for being late to reply. |
No problem at all! This is nobody's job, after all ;)
Oh, ok! I don't really mind either way, so happy to go with whatever works for you 👍 Feel free to close #1208 |
Ok, I'm going to merge this in here, assuming this copy to be the definitive one, as suggested above. |
Thanks for merging. Do we now add an action |
See #1202 for discussion. Actually I didn't add keyboard shortcuts because I can't find any
combination that works on my machine.