Vimjas / vim-python-pep8-indent

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

E127 continuation line over-indented for visual indent #100

Closed blueyed closed 6 years ago

blueyed commented 6 years ago

flake8 complains about:

    return [msg for msg in msgs
            if (msg[0] == 'notification'
                    and msg[1] == b'redraw'
                    and msg[2][0][0].startswith(b'popupmenu_'))]

and likes this better:

    return [msg for msg in msgs
            if (msg[0] == 'notification'
                and msg[1] == b'redraw'
                and msg[2][0][0].startswith(b'popupmenu_'))]

(E127 continuation line over-indented for visual indent)

black 18.6b4 turns it into:

    return [
        msg
        for msg in msgs
        if (
            msg[0] == "notification"
            and msg[1] == b"redraw"
            and msg[2][0][0].startswith(b"popupmenu_")
        )
    ]

where this plugin also adds extra indentation, but that is ok with flake8:

    return [
        msg
        for msg in msgs
        if (
                msg[0] == "notification"
                and msg[1] == b"redraw"
                and msg[2][0][0].startswith(b"popupmenu_")
        )
    ]

3.5.0 (mccabe: 0.6.1, pycodestyle: 2.4.0, pyflakes: 2.0.0) CPython 3.6.6 on Linux