New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Significant whitespace changes in Python are ignored #587
Comments
Oh my goodness, that's awful. Thanks for the report. |
This is a display issue: the diffing logic finds changes, but since Python uses indentation for blocks it's not finding anything to display in this case.
|
The display logic is assuming that you can't have a structural change without having some novel tokens, which isn't true here. Every token has a matching token on the other side, which is interpreted as no changes. See |
Should probably mark the first node in the changed subtree as novel when this occurs. |
The Python standard library tokenizer module (which you can test with |
I verified via
--dump-syntax
that ASTs are significantly different.Can compare them using
pr -m -t -w 160 <(difft --dump-syntax a.py) <(difft --dump-syntax b.py)
Issue duplicated as text:
Using the latest x64 build from releases page in github.
The text was updated successfully, but these errors were encountered: