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

bijection kwargs in __init__ aren't typed #192

Open
mlenzen opened this issue Jul 16, 2022 · 0 comments
Open

bijection kwargs in __init__ aren't typed #192

mlenzen opened this issue Jul 16, 2022 · 0 comments
Labels
typing Related to type annotations & mypy

Comments

@mlenzen
Copy link
Owner

mlenzen commented Jul 16, 2022

collections_extended/bijection.py:38: error: Invalid index type "str" for "bijection[K, V]"; expected type "K"

Keyword args to bijection.__init__ are always of type str and this may conflict with the declared type. How to handle? Could we raise a mypy error if kwargs are used and K is not str or a subtype?

@mlenzen mlenzen added the typing Related to type annotations & mypy label Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typing Related to type annotations & mypy
Projects
None yet
Development

No branches or pull requests

1 participant