Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type hints #87

Open
Avasam opened this issue Oct 25, 2022 · 1 comment
Open

Type hints #87

Avasam opened this issue Oct 25, 2022 · 1 comment

Comments

@Avasam
Copy link

Avasam commented Oct 25, 2022

3rd party pyscreeze type stubs have been added to typeshed (by myself) https://github.com/python/typeshed/tree/master/stubs/PyScreeze

It'd be best if the stubs were part of pyscreeze 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 pyscreeze 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.

@Avasam
Copy link
Author

Avasam commented Oct 25, 2022

asweigart/pyautogui#645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant