Open Avasam opened 2 years ago
3rd party pyautogui type stubs (by myself) have been added to typeshed https://github.com/python/typeshed/pull/8654 & https://github.com/python/typeshed/pull/8684
It'd be best if the stubs were part of pyautogui itself. You should be able to use them directly from typeshed (and they should be fairly accurate). Although they also wouldn't be removed from typeshed until a PyPI release of pyautogui includes the stubs.
Ultimately, the best scenario is to have inline typing directly, as it reduces chances of desync between stubs and implementation, and allows for easy type-checking in the CI and during development. However, due to the Python2 support requirement, inline type comments may be annoying, and will be more complicated to support multiple Python version while trying to keep typing as accurate as possible depending on what said version supports.
This should probably be done through type stubs.
Here are auto generated ones (I've already filled inhttps://github.com/python/typeshed/tree/master/stubs/PyAutoGUIFAILSAFE
andhotkey
since it's what I use):