Skip to content

Problem with list of strings and long strings #134

Open
@FantasticMrFux

Description

@FantasticMrFux

Maybe my problem hast to do with my lack of understanding of the pep8 standards.
So if I have a list of strings like this:

list_of_strings = ["Affy ID", "Agilent ID", "Allergome Code", "longerrrrrrrrrr ID", "ID", "WormPep Protein ID", "XenBase Gene ID", "ZFIN ID"]

when i gq I get the following result

list_of_strings = ["Affy ID", "Agilent ID", "Allergome Code", "longerrrrrrrrrr
                   ID", "ID", "WormPep Protein ID", "XenBase Gene ID", "ZFIN
                   ID"]

Which breaks my code

  File "./t.py", line 3
    list_of_strings = ["Affy ID", "Agilent ID", "Allergome Code", "longerrrrrrrrrr
                                                                                 ^
SyntaxError: EOL while scanning string literal

And under my understanding it should indent the line like so:

list_of_strings = ["Affy ID", "Agilent ID", "Allergome Code",
                   "longerrrrrrrrrr ID", "ID", "WormPep Protein ID",
                   "XenBase Gene ID", "ZFIN ID"]

Second assuming I have this string:

string = "Affy ID Agilent ID Allergome Code longerrrrrrrrrr ID ID WormPep Protein ID XenBase Gene ID ZFIN ID"

results in

string = "Affy ID Agilent ID Allergome Code longerrrrrrrrrr ID ID WormPep
Protein ID XenBase Gene ID ZFIN ID"

I would assume that it should like so:

string = ("Affy ID Agilent ID Allergome Code longerrrrrrrrrr ID ID WormPep"
          "Protein ID XenBase Gene ID ZFIN ID")

So what do I not understand?
Is there an option to stop vim-python-pep8-indent from wrapping in between strings?

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