Skip to content

MAINT: Chain some exceptions. - #16418

Merged
mattip merged 3 commits into
numpy:masterfrom
zaak71:chain-extensions
Jun 4, 2020
Merged

mattip merged 3 commits into
numpy:masterfrom
zaak71:chain-extensions

Conversation

@zaak71

@zaak71 zaak71 commented May 28, 2020

Copy link
Copy Markdown
Contributor

This is related to issue #15986. I have modified a few files in the numpy and numpy/core folders to fit what has been requested here. This is my first PR on GitHub so if I did anything wrong please let me know. Thank you.

Comment thread numpy/core/_dtype.py Outdated
Comment thread numpy/ctypeslib.py Outdated
@eric-wieser

Copy link
Copy Markdown
Member

Thanks for the patch! Everything looks great with the PR, just looks like I was unclear about how to choose between the two options in the tracking issue.

@charris charris changed the title ENH: Chain extensions in numpy and numpy/core ENH: Chain exceptions in numpy and numpy/core May 29, 2020
@charris charris changed the title ENH: Chain exceptions in numpy and numpy/core MAINT: Chain exceptions in numpy and numpy/core May 29, 2020
@charris charris changed the title MAINT: Chain exceptions in numpy and numpy/core MAINT: Chain some exceptions in numpy.ctypes and numpy.core May 29, 2020
@charris charris changed the title MAINT: Chain some exceptions in numpy.ctypes and numpy.core MAINT: Chain some exceptions. May 29, 2020

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a style nit. It might also be nice to convert the strings in AttributeErrors in numpy/core/records.py to f-strings (this might get the one suggestion below the line limit on its own) or to use .format, but it's not necessary.

Comment thread numpy/core/records.py Outdated
@zaak71

zaak71 commented May 30, 2020

Copy link
Copy Markdown
Contributor Author

Ok, I've implemented the feedback I've gotten. I also found some other places where I could fix the exceptions like this, should I just wait for this to be merged or should I keep working on this branch?

@rossbar rossbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I'd say hold off on new modifications (i.e. adding more chained exceptions) so the review doesn't get too muddled.

@mattip
mattip merged commit 489de42 into numpy:master Jun 4, 2020
@mattip

mattip commented Jun 4, 2020

Copy link
Copy Markdown
Member

Thanks @zaak71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants