Skip to content
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

Handle ValueError in magic %rerun #13011

Closed
wants to merge 1 commit into from
Closed

Handle ValueError in magic %rerun #13011

wants to merge 1 commit into from

Conversation

jmsdao
Copy link

@jmsdao jmsdao commented Jun 7, 2021

Fixes: #12948

Added a try/except block to handle non-integer arguments.

(venv) ipython$ ipython
Python 3.9.5 (default, May  5 2021, 02:58:34)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.0.dev -- An enhanced Interactive Python. Type '?' for help.

In [1]: %rerun -l one
Argument must be an integer.

All tests pass after running iptest:

IPython version: 8.0.0.dev
IPython commit : 90c1297 (repository)
IPython package: /mnt/c/Users/James/Documents/git_projects/ipython/IPython
Python version : 3.9.5 (default, May  5 2021, 02:58:34) [GCC 7.5.0]
sys.executable : /mnt/c/Users/James/Documents/git_projects/ipython/venv/bin/python3.9
Platform       : Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27

Tools and libraries available at test time:
   pygments

Tools and libraries NOT available at test time:
   matplotlib

Status: OK (7 test groups). Took 77.172s.

@jmsdao
Copy link
Author

jmsdao commented Jun 7, 2021

This is my first PR!

I'm still learning how to be a FOSS contributor. Please let me know of any improvements I can make on how I'm doing my PRs!
Any links to further reading is also much appreciated!

@MrMino
Copy link
Member

MrMino commented Jun 17, 2021

Hi @jmsdao. It looks ok, you just need to darker it . Also, just so you know: normally a PR like this requires adding a whatsnew entry, but this one is small (and it's a similar situation to #12980), so it's ok.

@nicolaslazo
Copy link
Contributor

nicolaslazo commented Dec 9, 2021

Problem was addressed in commit 3abc1a3fc :D

@meeseeksdev close

@lumberbot-app lumberbot-app bot closed this Dec 9, 2021
@Carreau Carreau added this to the no action milestone Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

%rerun doesn't handle integer parsing errors
4 participants