Fix assertion error when analyzing a sklearn module #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This pull request fixes the bug I've explained in issue #71.
I'm pretty sure that the problem is just an error in the assertion because if
len(self.contexts) > 1
at the line 322, then the conditionlen(self.contexts) < 2
in the if statement at line 323 will never beTrue
since there is no integerx
that verifies the proposition1 < x < 2
. I've added a=
in the assertion to fix the bug.I changed the other part of the code because while I was looking for the source of the bug, I often converted the AST to a string using the
ast.unparse
function and this function crashed because some of the arguments of theast.Call
node were missing. I'm pretty sure this is also a small bug.Have a nice day!