Skip to content
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

Difftastic incorrectly viewing indentation changes as non-syntactic in python #818

Closed
Joel-Singh opened this issue Feb 22, 2025 · 1 comment

Comments

@Joel-Singh
Copy link

Joel-Singh commented Feb 22, 2025

Line indentation is significant in python, and doesn't show up on difftastic when it changes.

Here's a contrived example consisting of old.py and new.py:

old.py

foo = "outer"

def contrivedFunctionExample():
    foo = "inner"
    print(foo)

contrivedFunctionExample()

new.py

foo = "outer"

def contrivedFunctionExample():
    foo = "inner"
print(foo)

contrivedFunctionExample()

The only difference between them is the indentation of print(foo).

They each print different things:

> python old.py
> inner
> python new.py
> outer
> 

And here is what difft outputs:

> difft old.py new.py
> new.py --- Python
> No syntactic changes.
> 

No syntactic changes despite the files having different output.

My difft --version:

> difft --version
> Difftastic 0.63.0
> 
> Revision:  f45f81cf98 2025-02-10
> Toolchain: 1.84.1
> System:    linux x86_64

Running Arch Linux

@Wilfred
Copy link
Owner

Wilfred commented Feb 22, 2025

Thanks for the report! This is a dupe of #587.

@Wilfred Wilfred closed this as completed Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants