-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: Postponed Evaluation of Annotations (PEP 563) #36034
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
Conversation
+/- 0 on doing this now versus waiting until its fully implemented in the standard library. Does this have a noticeable impact on import performance or is it stylistic for where we are at now? |
I've not tested performance, presumably the import time gets a little longer with every type annotation added. from a style POV. we can get rid of some noqa: F401 and get better formatting with black (although that's only really the case when PRs with whole typing expressions that sometimes get merged) for a contributor POV, there are less things to get right if don't need to ensure types are enclosed in quotes see #36022 (comment) from a reviewer POV, it's nice to just show the type in the IDE which can't be done with string literals (VS code anyway)
That'll be Python 3.10 |
I would be +1 on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
thanks @simonjayhawkins |
a few files as POC/for discussion
from https://www.python.org/dev/peps/pep-0563/