Skip to content

E126 on with statement line continuation #316

@darkfeline

Description

@darkfeline

E126 (continuation line over-indented for hanging indent) is reported on what I think should be correct formatting on line continuation in multiline with statements:

with open('foo') as foo, \
     open('bar') as bar, \
     open('baz') as baz:
    pass

PEP8 doesn't specify this explicitly, but I believe this is a perfectly reasonable and natural way to indent such a statement. Also, IDLE automatically indents this the same way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions