-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
com2ann: Convert type comments into Python type hints #2325
Conversation
What is the rationale to go away from using the typing module? The load time penalty is not that high but having 1 way to type hint the variables in the code improves readability through homogeneity by a lot. What am I missing @cclauss? |
@piiq Type hints are moving towards PEP 585 and PEP 604 and |
Thanks for pointing to the PEP. Is my understanding correct that:
|
Yes for 1. and 2. but I think the jury is still out on 3. ... See the footnote https://docs.python.org/3/library/__future__.html I have found it useful to run |
Thanks. In that case I have another question. From your perspective is it possible to move away from |
PEP20:
The Dutch part is significant here. The solution does not need to be too simplistic. The community is not saying that we should completely abandon the typing module. Instead, it advocates using pre-existing built-in types and the |
Thanks for sharing your thoughts. |
Description
https://pypi.org/project/com2ann
How has this been tested?
Checklist:
Others
pre-commit install
.pytest tests/...
.