Skip to content

Too long lines (E501) fail to be reported when ending with an open triple-quoted string #679

@dawagner

Description

@dawagner

I initialiy reported this issue on flake8 and got redirected here.

Too long lines (E501) fail to be reported when ending open with a triple-quoted string (aka longstring).

Here's an example:

foo.py:

$ cat foo.py 
len("this line if 86 chars long and is not reported.....", "foo bar baz spam egg", """
        some other string""")

len("this line is 86 chars long and is reported.........", """foo bar baz spam egg""",
    "some other string")

$ flake8 foo.py 
foo.py:4:80: E501 line too long (86 > 79 characters)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions