Skip to content

Python FP in py/unused-local-variable & py/unreachable-statement when using nonlocal variable #1268

Open
@imsolost

Description

@imsolost

False positive in Python for logic surrounding nonlocal variables. Variable declared as nonlocal and used concurrently is being treated as an unused local variable, which leads to alerts here:

Alerts

Forum post.

CC: @michalc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions