pyminifier
pyminifier copied to clipboard
Pyminifier kills singleton tuples
Singleton tuples are killed by pyminifier: something like "(42,)" is turned into "(42)" by the minification process, which doesn't mean the same thing at all.
This happens in minification.py, in the reduce_operators function. At the beginning of the 'else' of the second 'if' in the 'for' loop (line 217 in the version I have), replacing:
if token_string in ('}', ')', ']'):
with:
if token_string in ('}', ']'):
solves the issue.