-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add return type to get_children #2094
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## main #2094 +/- ##
=======================================
Coverage 92.77% 92.77%
=======================================
Files 94 94
Lines 11026 11026
=======================================
Hits 10229 10229
Misses 797 797
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
This should be SuccessfulInferenceResult
. See get_children
of nodes.Dict
.
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.
Oh and please remove the rtype
comments for any signature you fix
Is there some way to get |
Run Mypy and search the output for |
Yes, by using |
I guess my question was partly rhetorical, since I am sure there must be a better way π But I don't know what that better way is exactly. A But if it represents a real node, and can be called with all the same methods, then it ought to look like a real node to the type checker as well. At least that's my understanding of the situation. |
A class A():
...
x = A()
|
Type of Changes
Description
Add return annotations for
get_children
throughout. This reduces the number of warnings with strict Mypy, but it actually increases the number of non-strict warnings due to exposing other errors.