Skip to content

list_group undefined if python is run with -O flag #392

@uiop860

Description

@uiop860

So we have been trying to figure out this bug for a while, and i realized we are running python with the -O flag which means these lines don't get executed and therefore list_group is undefined.

assert item.parent and isinstance(
(list_group := item.parent.resolve(doc)), ListGroup
)

My linter actually caught this but, i didn't realize for a while.

https://docs.astral.sh/ruff/rules/assignment-in-assert/

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