wistful / SublimeAutoPEP8

Automatically formats Python code to conform to the PEP 8 style guide using autopep8 and pep8 modules
144 stars 23 forks source link

stuck with some syntax errors #29

Closed felixhao28 closed 9 years ago

felixhao28 commented 10 years ago

For some reason, when I press CtrlShift8, it refuses to format this:

def tmp(g):
    g(4)))

    if not True:
        pass
welbornprod commented 9 years ago

I think this is a problem with autopep8 itself. I submitted an Issue about the extra parenthesis problem.

welbornprod commented 9 years ago

myint has committed a fix for this in autopep8. It's still in alpha as of right now (1.0.5a0).

wistful commented 9 years ago

Thanks for handling this issue. I'm going to update autopep8 to the next stable realease 1.0.4. Unfortunately it will not fix this issue. Version 1.0.5a0 is not stable and should be tested before including into SublimeAutoPEP8.

Steps to manually replace autopep8(ST2): Sublime Text 2 -> Goto "Preferences" -> "Browse Packages..." -> Open AutoPEP8/sublimeautopep8lib -> replace autopep8.py, remove autopep8.pyc -> Restart ST2.

Steps to manually replace autopep8(ST3), Option 1: Update autopep8 for ST2 -> Open ST2 -> Open "Command Palette"(Shift+Ctrl+P) -> Type "Create Binary Package File" -> Select "AutoPEP8" -> Copy new created archive "AutoPEP8.sublime-package" to the ST3 "Installed Packages" folder(replace old file) -> Restart ST3.

Steps to manually replace autopep8(ST3), Option 2: Sublime Text 2 -> Goto "Preferences" -> "Browse Packages..." -> Open parent folder -> Open "Installed Packages" folder -> unpack "AutoPEP8.sublime-package" zip archive Open AutoPEP8/sublimeautopep8lib -> replace autopep8.py -> pack "AutoPEP8.sublime-package" -> Restart ST3.

welbornprod commented 9 years ago

I understand waiting for a stable autopep8. This bug has been a major source of frustration and I just wanted to do my part in ridding the world of it. :)

wistful commented 9 years ago

Fixed in v1.2