orderedset icon indicating copy to clipboard operation
orderedset copied to clipboard

Any plans for type hint / mypy support?

Open besfahbod opened this issue 6 years ago • 4 comments

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.

besfahbod avatar Jul 08 '19 22:07 besfahbod

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

Mattwmaster58 avatar Apr 19 '20 14:04 Mattwmaster58

@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?

blumu avatar Aug 26 '20 20:08 blumu

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

MapleCCC avatar Mar 08 '21 11:03 MapleCCC

@MapleCCC You are right, my bad!

blumu avatar Mar 08 '21 19:03 blumu