Skip to content

Empty block in middle of %if...%elif...%elif...%else...%endif doesn't get a pass in the Python, leading to an IndentationError #146

@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by Anonymous

How-To-Reproduce:

% if True:
test
% elif lose:
## do nothing
% elif False:
broken
% endif

Results:

An IndentationError pointing at the next line of code after the do-nothing block, complaining that Python was expecting an indented block.

Workaround:
Add <%pass%> to the do-nothing block


Attachments: 146.patch | 146.2.patch | 146.3.patch

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions