You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The comparison_operator rule contains in, and it appears the isinstance call is being incorrectly labeled as a comparison_operator because it's matching in. Is that what you think is happening @maxbrunsfeld?
The text was updated successfully, but these errors were encountered:
I think the problem is that the grammar did not include assert statements, so tree-sitter was parsing this code as if assert was just a normal identifier. It was then interpreting the word is in isinstance as a relational operator, as if the code was
aisinstance(copy2, variables.Variable)
I had an un-pushed commit adding assert statements, so I just pushed that. Maybe it will fix this issue.
@maxbrunsfeld ah thanks so much! I didn't think of assert as a Python keyword, instead seeing it in test files assuming it was a method call for a test framework used by tensorflow. That said, my Python knowledge is very limited 😅 .
Given the statement:
assert isinstance(copy2, variables.Variable)
The assert_statement rule now correctly parses this as:
Given the expression:
assert isinstance(copy2, variables.Variable)
The parse tree generated is:
The
comparison_operator
rule containsin
, and it appears theisinstance
call is being incorrectly labeled as acomparison_operator
because it's matchingin
. Is that what you think is happening @maxbrunsfeld?The text was updated successfully, but these errors were encountered: