Skip to content

E302 False-positive for variable names starting with def #617

@willhardy

Description

@willhardy

Given the following code:

defaults = {}
defaults.update()

A false positive is reported: E302 expected 2 blank lines, found 0.

Changing of the variable name to something that doesn't start with def avoids the false positive. This is only triggered in 2.3.0, not 2.2.0.

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