pythonparser
pythonparser copied to clipboard
Find a more reliable source origin for diagnostic
trafficstars
Coming from https://github.com/m-labs/artiq/issues/1671:
It seems like one of the issue stems from here: https://github.com/m-labs/pythonparser/blob/5413ee5c9f8760e95c6acd5d6e88dabb831ad201/pythonparser/diagnostic.py#L51-L53
And indeed the evaluation of the expression shows there are more than 2 elements.

While the source is clearly different, and it kind of makes sense for the compiler to throw an error like this, shouldn't we find a better source of determining the source origin?
