no-shared-mutable-default
Do not share mutable function defaults through aliases or read-only annotations.
Why
A read-only annotation does not make a list or dictionary immutable, and a named mutable default still shares one object between calls.
Fix
Use an immutable default or accept None and create the mutable value inside the function. Keep an intentional shared cache in an explicit owner.
Examples
from collections.abc import Sequence
def batch(values: Sequence[int] = []): return valuesfrom collections.abc import Sequence
def batch(values: Sequence[int] = ()): return values