We did a large change of the PyTorch codebase with ruff in pytorch/pytorch#99890 by enabling C419 with autofixes. It mostly worked out of the box, but we did have to add back in one type comment for mypy that got deleted by the autofix: pytorch/pytorch@ad98f63