Always leave a trailing comma in Python lists, dicts, tuples
poe.com
poe.com
The idea is that it does not show diff based on text change, but on syntastic meaning. For that, it uses tree-sitter.
I think it still shows the trailing comma in the situation as shown in the article, but it's quite different experience than the standard text based diff.
I'm always shocked at people's resistance when I suggest this. To some people, commas are the hill to die on, and seemingly not for any reason except "that's how we've always done it".
foo
{
...
}
to this foo {
...
} [1, 2, 3 and 4]
or [1, 2, 3, and 4]