ionelmc / python-hunter

Hunter is a flexible code tracing toolkit.
https://python-hunter.readthedocs.io/
BSD 2-Clause "Simplified" License
796 stars 46 forks source link

Type hints #43

Open The-Compiler opened 5 years ago

The-Compiler commented 5 years ago

I recently started using mypy with my project and it says "Cannot find module named 'hunter'".

Do you have any plans to introduce type annotations for hunter? Those could be done in the code as comments, as a separate stub file, or (whenever Python 2 support is dropped), with a proper annotation syntax.

Also, thanks a lot for hunter! Definitely an improvement over the sys.settrace(print) I used to do before I knew about it :wink:

ionelmc commented 5 years ago

I guess we could have some stubs, can't hurt. What I don't get is why you'd run mypy on debug code. Do you have some sort of enable-hunter switch in your app?

The-Compiler commented 5 years ago

Yeah - I do use it in two places: