Skip to content

E306 false positive #619

@mlococo

Description

@mlococo

If I create demo.py with the following contents:

def the_funk():
    1 + 1
    definitely_not_a_function = 1
    return definitely_not_a_function + 1

And run pycodestyle demo.py, I get: bug.py:3:5: E306 expected 1 blank line before a nested definition, found 0. I believe E306 is intended to apply to nested function definitions, but this does not contain a nested function definition.

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