Using MyPy
The type hints you installed when setting up PyCharm can also be used to check your code is correct, using a tool called MyPy. My Py will catch some cases where you’ve called Anki functions incorrectly, such as when you’ve typed a function name in incorrectly, or passed a string when an integer was expected. In PyCharm, click on Terminal in the bottom left, and typemypy myaddon. After
some processing, it will show a success or tell you any mistakes you’ve made.
For example, if you specified a hook incorrectly: