aisk / pick

create curses based interactive selection list in the terminal
MIT License
729 stars 63 forks source link

Add type hints #59

Closed MaxG87 closed 2 years ago

MaxG87 commented 2 years ago

As announced in #52 this pull request adds type hints. It changes how certain functions have to be used, so it requires an increment of the major version, according to SemVer.

By adding type hints I made the existing complexity of pick explicit. I managed to simplify things by two changes:

  1. Always return a list of picks, except when a custom handler is used.
  2. Use a default options_map_func to get rid of a default type.

I adapted the tests and examples. I make use of my fork of pick in another project, mtv-cli. There it helped me to get rid of some type warnings, but it is not yet extensive use or battle tested or something.

wong2 commented 2 years ago

Could you please rebase master?

idoo commented 2 years ago

@wong2 could you pls merge it?

MaxG87 commented 2 years ago

Hi @wong2 , it seems as if this PR got stalled quite a bit. Is there anything I could do in order to get it merged?

wong2 commented 2 years ago

Thanks @MaxG87