Skip to content
Sarj Code Standards

no-redundant-attribute-unpacking

Use an aggregate's named attributes instead of repeating their names in tuple aliases.

Why

A tuple assignment that repeats every attribute name adds parallel bindings without describing a transformation or a new concept.

Fix

Read the aggregate's named attributes directly. Retain intentional value snapshots with an explained local suppression.

Examples

Before — flagged Keep the named result aggregate
tests/test_save.py
def test_save(seeded):
scenario, current = seeded.scenario, seeded.current
assert scenario.id == current.id
After — preferred Read names on their owner
tests/test_save.py
def test_save(seeded):
assert seeded.scenario.id == seeded.current.id