8000 False positive for `F841 Unused variable` when using assignment expressions · Issue #843 · PyCQA/pyflakes · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
False positive for F841 Unused variable when using assignment expressions #843
Open
@jcarlosroldan

Description

@jcarlosroldan

This example from the PEP 572 incorrectly reports the total variable as unused:

def cumulative_sum(values):
    total = 0
    return [total := total + v for v in values]

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

      0