-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Suppress unsubscriptable-object
warnings in type-checking blocks
#5720
Conversation
0e906d8
to
55fc8b1
Compare
unsubscriptable-object
warnings in type-checking blocks
Pull Request Test Coverage Report for Build 2141248550
π - Coveralls |
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.
Can't approve a MR I myself opened but thank you @jacobtylerwalls, LGTM.
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.
β
@Pierre-Sassoulas I suppose this is a backport candidate to 2.13, if we're willing to fiddle with the changelogs. It's not critical. |
Type of Changes
Description
Fixes #3979. Statements under
if TYPE_CHECKING
are not evaluated at runtime. That's why you can subscript otherwise unsubscriptable objects!