Have you considered reducing review noise by using static analysis?
Yep, ruff has a warning for this exact issue.
Yep, ruff has a warning for this exact issue.