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

Review all uses of invariant types like typing.List #2326

Open
pquentin opened this issue Oct 5, 2023 · 0 comments
Open

Review all uses of invariant types like typing.List #2326

pquentin opened this issue Oct 5, 2023 · 0 comments

Comments

@pquentin
Copy link
Member

pquentin commented Oct 5, 2023

As shown in #2273 and #2321, using the List type in a library can be unnecessarily restrictive as it's an invariant type: https://mypy.readthedocs.io/en/stable/generics.html#variance-of-generic-types. This issue is about finding other cases where users can pass parameters typed as List or Tuple and fix them to use Sequence instead.

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

1 participant