simonpercivall / orderedset

Ordered Set implementation in Cython
Other
74 stars 14 forks source link

Any plans for type hint / mypy support? #24

Open besfahbod opened 5 years ago

besfahbod commented 5 years ago

Are there any plans for type hint / mypy support?

1) OrderedSet is not a generic type, so it's not possible to use OrderedSet[str]. 2) An OrderedSet of strings is not considered compatible with typing.Set[str] or typing.Iterable[str], making it not sit well in type-hinted projects.

Mattwmaster58 commented 4 years ago

I believe it could be enough to augment this library with a typing stub (.pyi), but I'm not that experienced with the matter. I think this could also be a candidate for a type stubs in the typeshed library

blumu commented 4 years ago

@Mattwmaster58 This project provides the typing stubs for the orderedset package: https://github.com/rominf/ordered-set-stubs. But somehow the project was archived claiming that the typing stubs are now part of orderedset itself, which does not appear to be the case. Any plan to include those stubs in the orderedset package in future releases?

MapleCCC commented 3 years ago

@blumu I think the type stub you mentioned is intended for https://github.com/LuminosoInsight/ordered-set , another ordered set implementation. Not this one.

blumu commented 3 years ago

@MapleCCC You are right, my bad!