-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[docs] Update common_issues.rst: update information about reveal type & locals #19059
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
base: master
Are you sure you want to change the base?
Conversation
…veal locals Previously it was impossible to have these in at run time (more or less), but now you can just import them.
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.
I tried to find the history of this decision but gave up.
Unsurprising since this was a CPython decision without a PEP or anything :^)
I'm going to guess it was either forgotten or discarded because other type checkers don't implement it. See python/cpython#90572
(this review is just a bunch of nitpicks)
I believe this was on the typing-sig mailing list. I initially proposed adding |
it doesn't in my local testing, but that's ok because it gracefully degrades down to `normal code`
Ah, nevermind: I actually get a hard error when I try to push that: `py:data reference target not found: typing.reveal_type`. This reverts commit a852106.
Previously it was impossible to have these in at run time (more or less), but now you can just import one of them.
Tangential open question I'm curious about: Is there any interest in getting reveal_locals into typing? I've never used it myself, so I have no strong opinions one way or the other, but I'm surprised reveal_type made it in and reveal_locals didn't! I tried to find the history of this decision but gave up.