Skip to content

UP028 for multiple loops does not work #13266

@spaceby

Description

@spaceby

UP028 does not work when there are multiple yield loops in a function

Code example:

def text_not_ok():
    a = [1, 2, 3]
    for photo in a:
        yield photo
    for photo in a:
        yield photo

https://play.ruff.rs/b9748aaf-8e8c-45cd-8138-20f41013b979

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions