Replies: 1 comment 3 replies
-
Hi @hkandjimi and thanks a lot for the PR. I tried a diff to look for the new rules and I have this: python:
aliased:
dict: collection_type
list: collection_type
set: collection_type
tuple: collection_type
flattened:
- identifier
- integer
- collection_type
- float
- boolean_operator
- comparison_operator
- expression_statement
- assignment I am not sure about the rules. Flattening boolean_operator, comparison_operator, expression_statement and assignment does not seems like a good idea since it's usually interesting to diff subexpressions. Integer, identifier and float are already leaf nodes. Regarding the aliased types (dict, etc...) I am not sure which source snippet would make them appear, could you provide a code snippet? Regarding the asserts it's a mere sanity check and it's supposed to change each time the rules change so no worries here. Cheers! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@jrfaller I have been playing around with the python rules for a while and tested them local which have worked fine. However, when I include the rules and compile a docker image I keep getting the error :
"PythonTreeSitterNgTreeGeneratorTest > testString() FAILED
org.opentest4j.AssertionFailedError: expected: <12> but was: <8>"
I have inspected the testString() in PythonTreeSitterNgTreeGeneratorTest class but not sure which features were counted to get to the 12.
Here are the new rules for python:
python_rules.txt
Kindly let me know if this would work or if I can change the assert check from 12 to 8 and possibly push the changes
Beta Was this translation helpful? Give feedback.
All reactions