no-mutating-input-with-result
Separate input attribute mutation from functions that return a result.
Why
Returning an operation result can hide writes to a request object retained by the caller. Reusing that input then observes state changed by an earlier call.
Fix
Build and return a replacement input before sending it, or expose a deliberate in-place command returning None. Preserve response values and input contracts; do not discard the result to silence the rule.
Examples
from attrs import define
@defineclass Request: expected_version: int
def send_update(body: Request) -> Response: body.expected_version = 2 return send(body)from attrs import define, evolve
@defineclass Request: expected_version: int
def send_update(body: Request) -> Response: updated = evolve(body, expected_version=2) return send(updated)