Skip to content

Incorrect indentation of 'elif' within nested 'if' statements #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stacybrock opened this issue Apr 23, 2019 · 1 comment · Fixed by #128
Closed

Incorrect indentation of 'elif' within nested 'if' statements #125

stacybrock opened this issue Apr 23, 2019 · 1 comment · Fixed by #128
Labels

Comments

@stacybrock
Copy link

:version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 11 2019 17:46:54)
macOS version

I'm running vim-python-pep8-indent @ commit 84f35c0

Before indentation:

#!/usr/bin/env python

x = 1
y = 2

if x == 1:
    if y == 2:
        pass
    elif y == 0:
        pass
    else:
        pass
elif x == 2:
    pass
else:
    pass

After indentation:

#!/usr/bin/env python

x = 1
y = 2

if x == 1:
    if y == 2:
        pass
    elif y == 0:
        pass
    else:
        pass
    elif x == 2:  # this elif block is incorrectly indented
        pass
else:
    pass

I believe this issue is similar to the one that was fixed in #97.

@blueyed blueyed added the bug label Apr 23, 2019
blueyed added a commit to blueyed/vim-python-pep8-indent that referenced this issue May 11, 2019
blueyed added a commit that referenced this issue May 11, 2019
@blueyed
Copy link
Member

blueyed commented May 11, 2019

Thanks for the report - should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants