pyminifier
pyminifier copied to clipboard
Indentation error: expected an indented block
Dear,
Here is a problem I was able to reproduce.
With this test code:
class MyClass(object):
def __init__(self):
self.a = 10
def __repr__(self):
return str(self.a)
c = MyClass()
print(c)
and the command pyminifier -O -o out.py test.py
I get the following code:
class W(l):
l=object
T=str
D=print
def __init__(K):
K.a=10
def __repr__(K):
return T(K.a)
c=W()
D(c)
leading to the error (with python 3.4.3) :
File "out.py", line 2
l=object
^
IndentationError: expected an indented block
pyminifier version : 2.2
Any idea how to solve this ?
Also experiencing this error. The minification process is not completeley correct.