https://docs.astral.sh/ruff/rules/custom-type-var-return-type/
I feel like logically a fix for this rule should be feasible without too much complexity? (at least in pyi files and maybe py files above 3.10, see #9761). Useful to migrate codebases still using the old TypeVar way of typing Self. The fix should be unsafe as there's still edge-cases where using a TypeVar is needed (typeshed has some of those). Marking it unsafe may also simplify the logic to apply the fix (if Self already exists in scope)