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

NotImplementedError returned instead of raised #144

Open
dacevedo12 opened this issue Sep 25, 2024 · 1 comment
Open

NotImplementedError returned instead of raised #144

dacevedo12 opened this issue Sep 25, 2024 · 1 comment

Comments

@dacevedo12
Copy link

dacevedo12 commented Sep 25, 2024

There are some functions like from_native in the VersionRange base class that return this exception instead of raising it.

This leads to a TypeError when using it as version in version_range.from_native(...), effectively attempting __contains__ over an exception class

Is this intended?

@pombredanne
Copy link
Collaborator

Is this intended?

It used to be a common idiom pre-typing, but it really does not matter. Raising is fine as the intention is to signal loudly that a base method is not implemented

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

No branches or pull requests

2 participants