mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Python: Fix parenthesized tuple parser bug
We were writing the `parenthesised` attribute twice on tuples, once because of the explicit parenthetisation, and once because all non-empty tuples are parenthesised. This made `tree-sitter-graph` unhappy. To fix this, we now explicitly check whether a tuple is already parenthesised, and do nothing if that is the case.
This commit is contained in:
@@ -35,3 +35,5 @@ t, u,
|
||||
x, y,
|
||||
#comment
|
||||
)
|
||||
|
||||
((z,))
|
||||
|
||||
Reference in New Issue
Block a user