Vimjas / vim-python-pep8-indent

A nicer Python indentation style for vim.
Creative Commons Zero v1.0 Universal
790 stars 69 forks source link

Add option for hanging closing brackets #94

Closed jakar closed 6 years ago

jakar commented 7 years ago

The main idea is discussed at length in PyCQA/pycodestyle#103.

It allows this style:

my_list = [
    1, 2, 3,
    4, 5, 6,
    ]

result = some_function_that_takes_arguments(
    'a', 'b', 'c',
    'd', 'e', 'f',
    )

A similar option was added to pycodestyle / pep8 awhile ago. See PyCQA/pycodestyle#207.

jakar commented 7 years ago

I am failing hard with these tests. They all pass on my local machine, with VIMRUNNER_REUSE_SERVER=1 and unset. Any suggestions?

blueyed commented 7 years ago

Would have to look into this myself, leave it like this for now?!

jakar commented 7 years ago

Yeah, let's leave it like this for now. It took me about a year to finally get around to making those small test changes and opening this PR. So I guess you could say that I'm not in a hurry.

blueyed commented 7 years ago

Yeah, I also feel sorry for the inherited test suite that we have to live with.

Thanks for bringing it up in the first place.

I plan to spend some Sunday afternoon here, with some ideas to fix https://github.com/Vimjas/vim-python-pep8-indent/pull/91 - but I am currently too far off, so it may take some Sundays.

jakar commented 6 years ago

Finally rebased, and now the tests pass. For good measure, I also ran them on my local machine (real X) and in a bionic container (fake X). Everything passes.

No idea why they failed before. I could never reproduce it.

blueyed commented 6 years ago

Thanks! (better late than never :D)