Skip to main content

What it flags

A Python loop rebuilds a growing list with items = items + [value].

Example

A list initialized to [] is repeatedly assigned items = items + [value] in a simple loop.

Example from the editor

For a list with no observers depending on intermediate copies.

Configuration

Set the rule to "off" in loadwise.config.json to drop its findings: