elasticsearch-py icon indicating copy to clipboard operation
elasticsearch-py copied to clipboard

Review all uses of invariant types like `typing.List`

Open pquentin opened this issue 2 years ago • 0 comments

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.

pquentin avatar Oct 05 '23 07:10 pquentin