Skip to content

Continuing strs when broken across lines #69

Description

@Ricyteach

Love the extension. Thanks for the work.

It would be great if str literals could be continued when broken across lines.

I had a line of code Like this:

my_str = f"{steps: >5d}    3    1    3    0{nodes: >5d}{elements: >5d}{boundaries: >5d}{materials: >5d}{optional(interfaces, ' >5d'):s}    1"

...and (with the help of Python Indent) reformatted it like this:

my_str = (f"{steps: >5d}    3    1    3    0"
          f"{nodes: >5d}{elements: >5d}"
          f"{boundaries: >5d}{materials: >5d}"
          f"{optional(interfaces, ' >5d'):s}    1")

A cool feature would be to have the quotation marks (with preceding f) automatically inserted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpull requests welcomePRs will be reviewed, but maintainers will not fix.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions