Skip to content

Implicit string concatenation rule with a list with a comment in between  #20854

@notatallshaw

Description

@notatallshaw

Summary

Currently this will not be picked up by any implicit concatenation rule nor by formatting:

foobar = [
    "foo"
    # Implicit concatenation occurs even with comment
    "bar"
]

print(foobar)

Every other issue I could find on this appeared to be closed, but none of them seemed to handle the edge case of comments in between. So apologies if this is a duplicate but I couldn't find it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions especially welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions