liftoff / pyminifier

Pyminifier is a Python code minifier, obfuscator, and compressor.
GNU General Public License v3.0
1.45k stars 223 forks source link

Master has issues with 'IndentationError: unindent does not match any outer indentation level' again #58

Open Herst opened 8 years ago

Herst commented 8 years ago

Creating a new thread, taking the testcases for the master version from #23, because the testcases for the release version don't apply to the master version any more (and probably vice versa) and confusion might ensue on what is fixed and what not.

Using the newest version from the master for minifaction yields the the IndentationError: unindent does not match any outer indentation level' again problem.

Here some test cases generated from real-life code.

Testcase №.1:

class a:
 def b():
  c=d
  (e,)=f
  if g:
   return
 def h():
  pass

Testcase №.2:

class a:
 def b():
  if c:
   d=e
   (f,)=g
   if h:
    return
  return

Testcase №.3:

def a():
 """b"""

 """c"""
 if d:
  return
 else:
  return