tweekmonster / impsort.vim

Sort and highlight Python imports in Vim
MIT License
37 stars 6 forks source link

Lonely Parenth #6

Closed tjdevries closed 8 years ago

tjdevries commented 8 years ago

I have a python file where the imports look like this:

from test.util import GeneralTester, wait_for_cycle_completion
from dexters_lab.util import create_stages
from dexters_lab.create_commands import create_start_cycle_command
from dexters_lab.ICD import (
    RUNNING, WAIT,
    SUCCESS_RESPONSE,
    TUMBLER, BURNER
)

Upon running :Imsport, I get the following:

from test.util import (GeneralTester,
                       wait_for_cycle_completion)

from dexters_lab.ICD import (BURNER,
                             RUNNING,
                             SUCCESS_RESPONSE,
                             TUMBLER,
                             WAIT)
from dexters_lab.util import create_stages
from dexters_lab.create_commands import create_start_cycle_command

)

The parenth on the bottom is lonely

tweekmonster commented 8 years ago

Ah, I didn't think about that. So ronery. 😢

If you indent that closing paren, it should be caught. I'll see if the voodoo pattern for import blocks can account for it. Thanks!