Skip to content

N816 considers generator/list comprehensions to be globally scoped #233

Open

Description

The following will trigger N816 twice:

(someVar1 == 8 for someVar1 in [])
[someVar2 == 8 for someVar2 in []]

N816 is explained as "mixedCase variable in global scope".

But are they really globals? Should there not be a new error code Nxyz for this? Or is it a limitation or shortcut in pep8-naming that leads to this behavior?

Version: 0.14.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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