paulknysh / blackbox

A Python module for parallel optimization of expensive black-box functions
MIT License
439 stars 60 forks source link

Python typing support #19

Closed bfelbo closed 2 years ago

bfelbo commented 4 years ago

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

paulknysh commented 4 years ago

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

bfelbo commented 4 years ago

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.

paulknysh commented 4 years ago

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

paulknysh commented 2 years ago

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