blackbox icon indicating copy to clipboard operation
blackbox copied to clipboard

Python typing support

Open bfelbo opened this issue 4 years ago • 3 comments

Thanks for a great piece of code! Have you considered typing it? That would make it easier to use and to improve on :)

bfelbo avatar Apr 30 '20 22:04 bfelbo

Hi, what do you mean by "typing it"?

paulknysh avatar May 01 '20 02:05 paulknysh

I mean adding type hints. The most amazing part about this repo is that it's simple enough to easily extend as needed. As an outsider, it would be much easier to extend the code if e.g. all the function parameters had type hints.

Moreover, it would make the code easier to use as static type checkers like mypy and pyright would pick up passing the wrong inputs to search_min.

bfelbo avatar May 01 '20 02:05 bfelbo

Thanks, I've never tried these, would be interesting to potentially add at some point.

paulknysh avatar May 01 '20 02:05 paulknysh

Added in https://github.com/paulknysh/blackbox/pull/28

paulknysh avatar Sep 05 '22 20:09 paulknysh