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

ValueErrors that should be TypeErrors #197

Open
mstites opened this issue Jul 22, 2022 · 1 comment
Open

ValueErrors that should be TypeErrors #197

mstites opened this issue Jul 22, 2022 · 1 comment
Labels
good first issue Good for newcomers invalid This doesn't seem right

Comments

@mstites
Copy link
Collaborator

mstites commented Jul 22, 2022

While working on Issue #188 / PR #195 I noticed that across the code base there are a number of places that use ValueErrors that should be TypeErrors. For example, in grama/comp_building.py line 59 & 60 read:

elif out is None:
        raise ValueError("`out` must be list or int")

This is an error for an invalid type (give out argument is None) but it throws a ValueError. This doesn't match Python naming conventions. This happens many places across the code base and this should be updated for user readability and matching the syntax of other packages. I went ahead and updated the eval functions, but the rest of the code base still needs to be updated.

This should be a simple fix of just updating the error type, and updating the associated unittests.

@mstites mstites added invalid This doesn't seem right good first issue Good for newcomers labels Jul 22, 2022
@mstites
Copy link
Collaborator Author

mstites commented Jul 29, 2022

Marked this as a good first issue. Recommend especially for any new software develop research assistants, as this task will require going through a lot of code, but not require a super dense understanding of every function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant