Skip to content

NameLUT: Raise IndexError instead of returning None #604

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

Merged
merged 1 commit into from
Mar 13, 2025

Conversation

pmhahn
Copy link
Contributor

@pmhahn pmhahn commented Mar 13, 2025

Mapping.__get__() should raise an IndexError instead of returning None like Mapping.get() does.

Otherwise type-checkers like mypy and pyright will complain #514 as the signature of the overwritten method is different from the signature of the super class Mapping.

`Mapping.__get__()` should raise an `IndexError` instead of returning
`None` like `Mapping.get()` does.

Signed-off-by: Philipp Hahn <[email protected]>
@eliben eliben merged commit 5258f51 into eliben:main Mar 13, 2025
4 checks passed
@pmhahn pmhahn deleted the namelut branch March 14, 2025 10:33
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.

2 participants