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 simple replacement rather than string formatting in format_kernel_cmd #4336
Conversation
pat = re.compile(r'\{([A-Za-z0-9_]+)\}') | ||
def from_ns(match): | ||
"""Get the key out of ns if it's there, otherwise no change.""" | ||
key = match.groups()[0] |
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.
match.group(1)
is marginally neater.
Overall design looks fine, just a couple of nitpicks on details. |
…_cmd closes ipython#4334 candidate for backport
Thanks, that's cleaner. |
Good, merging. |
use simple replacement rather than string formatting in format_kernel_cmd closes #4334
Hum... apparently my proxy prevent me to use the backport-pr script ... So not backported yet. Will try to do it by hand. |
Can one of you backport for me ? Even manually I apparently cannot push on ipython/ipython from where I am now.
|
…ng in format_kernel_cmd closes #4334
Ok, I acchieved to push on 1.x branch, but had to go through ssh. Hate that because then it does not ask me my password cause of keychain. |
* commit 'rel-1.1.0-7-gf5891e9': Backport PR ipython#4346: getpass() on Windows & Python 2 needs bytes prompt Backport PR ipython#4336: use simple replacement rather than string formatting in format_kernel_cmd Backport PR ipython#4316: underscore missing on notebook_p4 Backport PR ipython#4257: fix unicode argv parsing
* commit 'rel-1.1.0-7-gf5891e9': (70 commits) Backport PR ipython#4346: getpass() on Windows & Python 2 needs bytes prompt Backport PR ipython#4336: use simple replacement rather than string formatting in format_kernel_cmd Backport PR ipython#4316: underscore missing on notebook_p4 Backport PR ipython#4257: fix unicode argv parsing Backport PR ipython#4209: Magic doc fixes Backport PR ipython#4204: remove some extraneous print statements from IPython.parallel back to dev release 1.1.0 don't upload to GitHub in release script 1.1 backport stats Backport PR ipython#4188: Allow user_ns trait to be None Backport PR ipython#4189: always fire LOCAL_IPS.extend(PUBLIC_IPS) Backport PR ipython#4174: various issues in markdown and rst templates Backport PR ipython#4181: nbconvert: Fix, sphinx template not removing new lines from headers Backport PR ipython#4043: don't 'restore_bytes' in from_JSON Backport PR ipython#4178: add missing data_javascript Backport PR ipython#4136: catch javascript errors in any output Backport PR ipython#4163: Fix for incorrect default encoding on Windows. Backport PR ipython#4171: add nbconvert config file when creating profiles Backport PR ipython#4159: don't split `.cell` and `div.cell` CSS ...
use simple replacement rather than string formatting in format_kernel_cmd closes ipython#4334
closes #4334
candidate for backport